Error when trying to run `npm run dev`
Answered
Ceddix posted this in #help-forum
CeddixOP
> next dev
C:\xampp\htdocs\carpet\node_modules\next\dist\lib\picocolors.js:134
const { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:749:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
at Module.load (internal/modules/cjs/loader.js:672:32)
at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
at Function.Module._load (internal/modules/cjs/loader.js:604:3)
at Module.require (internal/modules/cjs/loader.js:711:19)
at Module.mod.require (C:\xampp\htdocs\carpet\node_modules\next\dist\server\require-hook.js:64:28)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (C:\xampp\htdocs\carpet\node_modules\next\dist\build\output\log.js:55:21)
at Module._compile (internal/modules/cjs/loader.js:805:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! carpet@0.1.0 dev: `next dev`
npm ERR! Exit status 1Answered by Rafael Almeida
What is your node.js version? Next requires at least v18.17
11 Replies
What is your node.js version? Next requires at least v18.17
Answer
CeddixOP
ohhh
okay so I actually updated nodejs
but it seems like it didn't work
the thing is if I open my
cmd as administrator, it says that I'm on version v20.9.0 but if I got to the normal cmd or inside IntelliJ it still seems to be v11.13.0Try rebooting the PC
CeddixOP
I already did that
If that doesn't work you will likely need to check the settings on the IDE, it might be using a different install path
CeddixOP
It think it's not related do the IDE but rather something with windows >.>
Oh I found the error
Thanks for your help tho!