I'm doing the starter Next.js tutorial and encountering an error when I try to run the Next dev server and run my app.
Here is what my package.json file contains:
{
 "scripts": {
 "dev": "next dev"
 },
 "dependencies": {
 "next": "^12.2.0",
 "react": "^18.2.0",
 "react-dom": "^18.2.0"
 }
}
When running npm run dev, I get the following error:
> @ dev /Users/renaudj/Documents/Projects/next-app
> next dev
/Users/renaudj/Documents/Projects/next-app/node_modules/next/dist/trace/report/index.js:14
 reporters = [];
 ^
SyntaxError: Unexpected token =
 at new Script (vm.js:79:7)
 at createScript (vm.js:251:10)
 at Object.runInThisContext (vm.js:303:10)
 at Module._compile (internal/modules/cjs/loader.js:657:28)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
 at Module.load (internal/modules/cjs/loader.js:599:32)
 at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
 at Function.Module._load (internal/modules/cjs/loader.js:530:3)
 at Module.require (internal/modules/cjs/loader.js:637:17)
 at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `next dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/renaudj/.npm/_logs/2022-07-04T05_09_15_196Z-debug.log
Anyone know what I'm missing here? Thank you!
- 
 3I'm guessing your Node version is less than 12.0. See Minimum Node.js version, you need at least 12.22.0Phil– Phil2022年07月04日 05:38:38 +00:00Commented Jul 4, 2022 at 5:38
 - 
 Thanks, Phil. That was the issue.Josh– Josh2022年07月04日 20:51:35 +00:00Commented Jul 4, 2022 at 20:51
 - 
 That means that this docs page is wrong because it says minimum node version is 10.13 - nextjs.org/learn/basics/create-nextjs-app/setupJK.– JK.2022年08月23日 09:46:15 +00:00Commented Aug 23, 2022 at 9:46
 
4 Answers 4
I update my node version V11.15.1 to V12.22.1 then it's solved
Comments
I update my node version V10->V16. it' work
1 Comment
Yes, updating your version of node will solve this issue.
Before doing this, delete the node_modules folder in your project.
Then to update node to the latest stable version, run the following command on your terminal:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
You may need to restart your terminal to see the version update which you check using:
node -v
Then reinstall your project using
npm install
 Comments
Basically I have multiple versins of node.
It is possible through nvm
I switched to node 14 using the command :
node use 14.15.0