Failed to load next.config.js
See original GitHub issueIssue Description
After cloning the repository I created and set my .env.local
file, ran npm i
then ran npm run dev
. The server starts, env is loaded from .env.local
however it immediately fails prompting me with the following:
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] (C:\Users\Nick\Desktop\rebuild\node_modules\next\dist\server\config.js:399:74)
at async NextServer.loadConfig (C:\Users\Nick\Desktop\rebuild\node_modules\next\dist\server\next.js:110:22)
at async NextServer.prepare (C:\Users\Nick\Desktop\rebuild\node_modules\next\dist\server\next.js:92:24)
at async C:\Users\Nick\Desktop\rebuild\node_modules\next\dist\cli\next-dev.js:126:9
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rebuild@0.1.0 dev: `next dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rebuild@0.1.0 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! C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2021-10-29T19_47_30_427Z-debug.log
Issue Analytics
- State:
- Created a year ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Failed to load next.config.js - Stack Overflow
Solution: Modify the build script to use the correct path to Node.js, or update the Node.js version under the used path. 4. broken...
Read more >next-config-error - Next.js
When attempting to load your next.config.js or next.config.mjs file, an error occurred. This could be due to a syntax error or attempting to...
Read more >Error: Failed to load next.config.js - Square Developer
I'm getting a config error when running npm run dev coming from next.config.js and can't figure out what's causing it.…
Read more >[Solved]-Failed to load next.config.js-Reactjs - appsloveworld
Solutions: · update Node.js to the supported version. · make sure you are using the correct environment, or use the correct path to...
Read more >failed to load config next to extend from - You.com | The AI ...
I keep getting this error while trying to build my next.js project. The only way I found online to maybe bypass it is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
for me, removing “type”: “module” from package.json fixed the problem, but it was there for a reason
Indeed. i got confused with all the different gitHub issues i had opened.
my apologies!