a16z-infra/companion-app

next-dev.js:257 - SyntaxError: Unexpected token '?'

yanncarlier opened this issue · 2 comments

##########################
Ubuntu 22.04.3 LTS
##########################
node -v
v12.22.9
##########################
npm -v
8.5.1
##########################
npm run dev

ai-getting-started@0.0.0 dev
next dev

./node_modules/next/dist/cli/next-dev.js:257
showAll: args["--show-all"] ?? false,
^

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.dev (./node_modules/next/dist/lib/commands.js:15:30)
at Object. (./node_modules/next/dist/bin/next:150:28)
at Module._compile (internal/modules/cjs/loader.js:999:30)
##########################

its working now with
node -v
v18.8.0

after installing node v18.8.0 and reinstalling the node modules works