Next dev command doesn't work
See original GitHub issueVerify canary release
- I verified that the issue exists in Next.js canary release
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 16.14.2 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 12.1.5 react: 18.0.0 react-dom: 18.0.0
What browser are you using? (if relevant)
Chrome (latest), Mozilla (latest)
How are you deploying your application? (if relevant)
No response
Describe the Bug
Since the last Next.js update, Next.js is not working on my windows PC but it is working well on my MacBook. So, at first, I thought it was my PC’s problem then I checked my old projects that used Next.js and I found that they work well just the new version gives the error.
Here is the error:
Suppose on my desktop I’ve created the next app from the scratch and it is located on G:\nextjs\example
So when I run npm run dev
or yarn dev
It gives me the following error.
> example@0.1.0 dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
wait - compiling...
error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'G:\nextjsexample\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'G:\nextjs\example\node_modules\next\dist\client\dev'
So if we see it is calling a file G:\nextjsexample\node_modules\next\dist\compiled\regenerator-runtime\runtime.js
but it is missing a \
after the example
folder. The path should be G:\nextjs\example\node_modules\next\dist\compiled\regenerator-runtime\runtime.js
. I’ve also tried to run it using CMD and Git Bash but it gives same error.
Expected Behavior
The Next.js development server should run properly instead of giving the internal error.
To Reproduce
npx create-next-app example
npm run dev
# or
yarn dev
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
@renatovitor01 until they fix this bug I’m using the v12.1.4 version of Nextjs and it is working well. The same problem was also in the v11.1.1 and after their update, it was fixed. But now their new version v12.1.5 has the same bug.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.