I pulled a nextJS application from git and tried starting it using npm run dev
,npx next dev
npm run start
, matter of fact, every single command I ran gave me the same error.
To further troubleshoot, I followed a youtube tutorial and I started a brand new project ran npx create-next-app appname
and again. Same error.
H:\Documents\Projects\React\NextTutorial\ninjalist>npm run dev [email protected] dev next dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000 error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error Error: Not supported at Object.loadConfig [as default] (H:\Documents\Projects\React\NextTutorial\ninjalist\node_modules\next\dist\server\config.js:399:74) at async NextServer.loadConfig (H:\Documents\Projects\React\NextTutorial\ninjalist\node_modules\next\dist\server\next.js:110:22) at async NextServer.prepare (H:\Documents\Projects\React\NextTutorial\ninjalist\node_modules\next\dist\server\next.js:92:24) at async H:\Documents\Projects\React\NextTutorial\ninjalist\node_modules\next\dist\cli\next-dev.js:126:9
Most prominent is it's failing to load next.config.js
and the contents of that file is simply
/** @type {import('next').NextConfig} */ module.exports = { reactStrictMode: true, }
Appreciate if I could be informed on what i'm missing cause I have not written any code, this is straight from the create app and I am getting this error. Gratitude for the assistance.
CodePudding user response:
Solved it by upgrading to the latest version of NodeJS
CodePudding user response:
Dont waste even a single minute. Just update to the latest version of node