I get the following error when building with Needle 3.31.0:
`/Needle/Main%202/node_modules/vite/bin/vite.js:7
await import(‘source-map-support’).then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)`
Any ideas on how to fix?
Original Post on Discord
by user 1100349294130765885
needle-bot
(🌵 Needle Bot)
January 29, 2024, 12:00am
2
Hello there – we have an experimental AI bot that might be able to help you with your question. Would you like to try this out?
marcel
(marwi)
January 29, 2024, 12:00am
3
The code doesnt look familiar - which vite version are you using there?
vite 4.1.4
by user 1100349294130765885
marcel
(marwi)
January 29, 2024, 12:00am
5
marcel
(marwi)
January 29, 2024, 12:00am
6
try updating to 4.3.9 - that’s the current version our templates use
marcel
(marwi)
January 29, 2024, 12:00am
7
which nodejs version are you using?
Seems my node is defaulting to 12 when I build, did nvm 18 now and it ran. But when I run from Unity its back to node 12
by user 1100349294130765885
marcel
(marwi)
January 29, 2024, 12:00am
9
can you check the project validation window if it contains a path to the wrong version?
.nvm/versions/node/v20.9.0/bin
by user 1100349294130765885
marcel
(marwi)
January 29, 2024, 12:00am
12
what’s the output you get with nvm ls
in a terminal?
v16.14.0
v17.8.0
-> v18.13.0
v20.9.0
system
default -> 12 (-> v12.22.7)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v20.9.0) (default)```
*by user 1100349294130765885*
marcel
(marwi)
January 30, 2024, 12:00am
14
Is it your intention to have node 12 as the default?
marcel
(marwi)
January 30, 2024, 12:00am
15
Can you change the default to e.g. 18?
marcel
(marwi)
January 30, 2024, 12:00am
16
What terminal output do you get for `which node` --version
I did change to default to 18 and it works, don’t know why it defaulted to 12 but couldn’t Needle to use nvmrc to set the correct Node version?
by user 1100349294130765885
marcel
(marwi)
January 30, 2024, 12:00am
18
Good to hear.
I will look into nvmrc to see if thats a possibility