Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Next.js: ./node_modules/next/dist/client/dev/amp-dev.js

I have a very serious issue right now trying to use Next js. No matter what version I use, any time I try to run the npm run dev, I get the following error:

error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'C:\Usersudbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\client\dev'      
error - Error: Cannot find module 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.next\fallback-build-manifest.json'Require stack:

This is literally right after running the create next app command, so I don't install any additional package. One thing realized though is that this error doesn't occur when I use the public folder on my window PC but when I use the user folder called udbasili I get the above error. I have been using next.js for a long time and this is the first I am seeing this error

like image 888
Udendu Abasili Avatar asked Sep 02 '25 03:09

Udendu Abasili


1 Answers

I had the same issue the problem was that my project files was in a folder beginning with "ud". My folder name was "udemy". Renaming that folder or moving the project outside that folder solved the issue

like image 62
Johansrk Avatar answered Sep 04 '25 21:09

Johansrk