question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Next dev command doesn't work

See original GitHub issue

Verify 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:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
udoyhasancommented, Apr 24, 2022

@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.

0reactions
github-actions[bot]commented, May 30, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"npm run dev" works, but "next dev" does not - Stack Overflow
I'm trying Next for the first time (with npx create-next-app ), but I'm not getting the scripts to work. npm run dev works...
Read more >
What to do when "npm run dev" is not working? (React)
I tried to start my application with “npm run dev” as it is a react / next.js app. The console gave me an...
Read more >
Next.js CLI
The Next.js CLI allows you to start, build, and export your application. To get a list of the available CLI commands, run the...
Read more >
Install Next.js on Windows | Microsoft Learn
To install Next.js, which includes installing next, react, and react-dom: Open a WSL command line (ie. Ubuntu).
Read more >
Console/Don't Starve Together Commands - Fandom
Locate the settings.ini and open it with Notepad or other text editors. Locate the [MISC] section, and make sure you are having console_enabled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found