Trying to play the vue sample

I’m getting a ton of errors in the console that say “Failed to resolve import X from “com.needle.engine@2.67.8-pre.1\package~\src\engine\engine_web_api.ts?v=128537b4”. Does the file exist?”

The file exists if I go to that path but it is called xyz.ts and not xyz.ts?v=128537b4.
I’m getting the same error with the same exact values(the ?v=128537b4)

Original Post on Discord

by user 483253293477265409

Try restarting your local server. The ?v= is something vite appends. It shouldnt be a problem but maybe the file didnt exist when you started the server?

Can you list what you did before playing the scene? Did you play any other scene? I would like the better handle those errors (or ideally find a way to avoid them altogether) but I’m not sure how to reproduce it

I just tried playing the same scene on that version + the previous version but it worked here. Not sure what caused it in your case

I just did a clean install (ALT + install ) and it tells me the same. I tried another sample and that seems to work, I will try to reinstall the samples. Also when I open the vsc workspace for that scene it shows me this folder as if it was missing

by user 483253293477265409

by user 483253293477265409

vue2.png

by user 483253293477265409

Ah yeah it is missing - i put the sample together from another project, seems like I forgot to cleanup the workspace file

Did you download the samples repository, opened the scene and clicked play?

yes, somehow I removed the package and imported the package again and when I click play it tells me that the scene has not changed, skipping export

by user 483253293477265409

Thats smart export - if the scene in Unity didnt change and the glb exists it wont export again. You can toggle anything in your scene (to make it dirty) and save the scene

by user 483253293477265409

It’s a dependency in the package. Either vscode is not up to date with the files on your system (sometimes that happens) or it wasnt installed by npm for some reason (you can check node_modules/flatbuffers)
image.png

its not only that one, that’s an example of the many (maybe like 100) errors of that type that I’m seeing

by user 483253293477265409

Which node version are you using?

Node.js v19.5.0

by user 483253293477265409

Ok, 19 is not yet LTS so we dont support it (current LTS is node 18)

Maybe that’s causing issues for you?
Can you try installing node 18 ?

ok I will try that

by user 483253293477265409

its still the same

by user 483253293477265409