Cannot read properties of undefined

I’m trying to install/play the sample, but I keep getting: “Cannot read properties of undefined” as a response in the terminal and in the webpage. I’m using Unity 2021.3.21. Any help would be appreciated!

Error message:

    at Context.load(...Needle%20Try%202/Needle/CollaborativeSandbox/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:37051:65)
    at Object.load (...Needle%20Try%202/Needle/CollaborativeSandbox/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:42892:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async loadAndTransform (...Needle%20Try%202/Needle/CollaborativeSandbox/node_m

[Original Post on Discord](https://discord.com/channels/717429793926283276/1135024922859671714)

*by user 225092454464880640*

This is the Collaborative Sandbox project

by user 225092454464880640

Hi, which OS are you using? It sounds like OSX or maybe linux?

Can you try doing a clean install ? (Hold ALT then click install on the ExportInfo component)

I’m using Windows 11. I’ll try what you recommended

by user 225092454464880640

Update: I get the same issue after a clean install.

by user 225092454464880640

I tried it on Unity 2021.3.29 and am facing the same issues.

by user 225092454464880640

And the same issue with Unity 2021.3.10. What else shall I try? Or is there more information I can provide?

by user 225092454464880640

Not sure if it matters, but I’m using node: ‘v18.17.0’, npm: ‘9.6.7’

by user 225092454464880640

The following info might help:

  • How did you install or create the Collaborate Sandbox?
  • Did you install the samples package? If yes can you check which version you have?
  • Which version of NEedle engine do you use? See the bottom of the ExportInfo component

The node version is fine :slightly_smiling_face: and all those Unity versions should work. I think it’s unrelated to that

Oh and which browser and which browser version are you currently using?

Another thing: can you copy paste your package.json here? You get it via the Open Workspace button on the ExportInfo component (either drop the whole file or just copy paste the content)

Install/Create: I’ve tried both the introductory button “Create Sample Scene” as well as generating a scene from ExportInfo.

No, I didn’t install the samples package. I’ll do so now.

Needle Version 3.5.0-exp

(Thanks for helping!)

by user 225092454464880640

Browser is Chrome 115.0.5790.110 (official)

by user 225092454464880640

Can you try updating to the latest version? 3.11.0-pre ?

Yes, will do

by user 225092454464880640

Oh please send the package.json

There’s a version of vite that is currently causing issues (>= 4.4.0 - I’m curious if that’s the reason here as well)

Oh, never mind, I was actually using 3.11.0-pre.

by user 225092454464880640