change the line

import { Joi } from "joi-browser";

to

import Joi from "joi-browser";

and that should solve the error.

Answer from codeMe on Stack Overflow
🌐
RPG Maker Forums
forums.rpgmakerweb.com › home › game development engines › rpg maker mz support
"TypeError: Cannot read property 'length' of undefined" How do i fix this? | RPG Maker Forums
July 27, 2022 - The error simply states that the property 'length' is trying to be read on some unknown object. It could be a number of issues causing this. You should double check that your plugin notes are set up correctly to be used for CGMZ vehicle encounters. ... "OF UNDEFINED" always means that the engine ...
🌐
TikTok
tiktok.com › discover › cara-mengatasi-type-error-joiplay
Cara Mengatasi Type Error Joiplay
Discover your favorite brands, all in one place. Shop authentic products from verified official shops on TikTok Shop · Discover unique finds inspired by nature. 🌿✨ Shop crystals, minerals, fossils, plants, and more during #NatureFindsWeek, and uncover one-of-a-kind treasures from the ...
🌐
TrackJS
trackjs.com › javascript answers › how to fix `cannot read properties of undefined (reading 'length')`
How to fix `Cannot read properties of undefined (reading 'length')` • TrackJS
April 8, 2026 - Common JavaScript error when accessing length property on undefined values. Usually occurs with arrays, strings, or API responses that haven't loaded yet. Quick fixes: add null checks, use optional chaining, handle loading states.
🌐
Reddit
reddit.com › r › RPGMaker › comments › 1rl1cm8 › help_with_typeerror_cannot_read_properties_of
r/RPGMaker - Ayuda con: "TypeError: No se pueden leer ...
This is a subreddit focused on discussing RPG Maker. This includes any version from 95 to MZ to any of the console titles.
🌐
Rollbar
rollbar.com › home › how to fix typeerror: cannot read property of undefined in javascript
Cannot Read Properties of Undefined in JavaScript [Fixed]
Cannot read properties of undefined (reading 'length', 'data', any key) means the object is undefined. Fix it with checks, optional chaining, defaults.
Published: 2 weeks ago
🌐
Reddit
reddit.com › r/rpgmaker › please help: "typeerror: cannot read property 'x' of undefined"
r/RPGMaker on Reddit: Please Help: "TypeError: Cannot read property 'x' of undefined"
August 15, 2024 -

I already posted this on RPG maker forums but might as well post it here, while its waiting for approval.

I have this part in my game, where the positioning of characters switches around after a cutscene. I do this using the "Save Event Position" plugin by Shaz. Since today after the cutscene, this error message started popping up.

Disabeling the plugin fixes it, it's essential to the gameplay though. I've compared it with a backed up version from 4 days ago (my backed up version from yestarday has the same issue) where the problem doesn't occur. I compared the event, that triggers the plugin with the old version and haven't found any differences. As I have no knowledge of JS I'm pretty stumped.

Does anyone have any ideas? Many thanks in advance! 

Find elsewhere
🌐
GitHub
github.com › hapijs › joi › issues › 1138
"Error: Cannot read property 'length' of undefined" when attempting extend · Issue #1138 · hapijs/joi
March 27, 2017 - Error: Cannot read property 'length' of undefined Object.toString (node_modules/joi/lib/errors.js:75:31) processErrors (node_modules/joi/lib/errors.js:130:36) Object.exports.process (node_modules/joi/lib/errors.js:153:22) type._validateWithOptions (node_modules/joi/lib/any.js:630:31) Object.root.validate (node_modules/joi/lib/index.js:121:23) Test.t [as fn] (test/ava/framework/data/joi-test.js:127:21)
Author: hapijs
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-cannot-read-property-length-of-undefined
Cannot read properties of undefined (reading 'length') in JS | bobbyhadz
The "TypeError: Cannot read properties of undefined (reading 'length')" error occurs when accessing the length property on an undefined value.
🌐
GitHub
github.com › hapijs › joi › issues › 2356
Cannot read property 'presence' of undefined`, · Issue #2356 · hapijs/joi
April 18, 2020 - [Error [ValidationError]: "name" failed custom validation because Cannot read property 'presence' of undefined] { _original: { name: 'John Doe', email: '12ddh3@example.com', password: '12324sgs4sfsf674yhlh' }, details: [ { message: `"name" failed custom validation because Cannot read property 'presence' of undefined`, path: [Array], type: 'any.custom', context: [Object] } ] }
Author: hapijs
🌐
Reddit
reddit.com › r/learnjavascript › [deleted by user]
[deleted by user] : r/learnjavascript
July 15, 2022 - You’re getting this error when calling the length property on something. That means that something you have use .length on is undefined at some point.
🌐
GitHub
github.com › laurent22 › joplin › issues › 7394
Joplin 2.8.8 TypeError: Cannot read properties of undefined (reading 'length') · Issue #7394 · laurent22/joplin
December 2, 2022 - Joplin 2.8.8 Error "TypeError: Cannot read properties of undefined (reading 'length')" is reported using the S3 (Object storage for Tencent Cloud) synchronization method The same ...
Author: laurent22
🌐
Stack Overflow
stackoverflow.com › questions › 78264410 › javascript-cannot-read-properties-of-undefined-reading-length-code-does
typeerror - JavaScript - Cannot read properties of undefined (reading 'length') - (Code does work and provided) - Stack Overflow
Typing in 100.1 will show 1 However, when you first click on the field, you will get the Uncaught TypeError. Cannot read properties of undefined (reading 'length') The code is originally written with a hardcoded value.
🌐
GitHub
github.com › elliottdehn › open-jobs › issues › 10
Error: Stopped: Cannot read properties of undefined (reading 'length') · Issue #10 · elliottdehn/open-jobs
1 week ago - Search not completing, terminating with error: Stopped: Cannot read properties of undefined (reading 'length')
Author: elliottdehn
🌐
Rollbar
rollbar.com › home › how to fix typeerror: cannot read property length of undefined in javascript
How to Fix TypeError: Cannot Read Property Length of Undefined in JavaScript
Calling .length on a variable that is undefined or null throws this error, often from an unresolved async response. Fix it with a null check or ?.length.
Published: July 13, 2025
🌐
itch.io
itch.io › hakuen studio picture manager for rpg maker mz › community
[SOLVED] "Cannot read property 'prototype' of undefined" error - Hakuen Studio Picture Manager for RPG Maker MZ community - itch.io
January 14, 2024 - UPDATE: It was my MZ Core Script being out of date that caused the issue! As of this writing, updating it to 1.7.0 (the latest version) did the trick. -- ORIGINAL POST Basically what the title says. I