Next.js Discord

Discord Forum

Next.js npm run dev hangs with no error output on Node.js 22

Unanswered
Blue swimming crab posted this in #help-forum
Open in Discord
Blue swimming crabOP
I am running a Next.js app with the command npm run dev, but the development server just hangs without any errors. The terminal output shows only:

and then stays stuck. The server never starts fully (no localhost URL is shown) and there are no error messages.

Environment:

Node.js version: v22.11.0

npm version: 11.5.1

Next.js version: 15.4.5

React and ReactDOM version: 19.1.0

I need help , I have tried deleting node modules , cleaning cache still I am stuck with this issue

38 Replies

Blue swimming crabOP
/bump
Milkfish
I had this same issue when i ran two next servers at the same time.
One was using port 3000, and the other was supposed to use 3001, but for some reason, it just froze.
Sometimes, it'll show compiling and just freeze.
Blue swimming crabOP
what's the solution??
Milkfish
Twas weird.
I ended up killing the first server, and ran the other next server on a new instance of my terminal.
And it worked.
Blue swimming crabOP
How to do that
because it is working fine is production
but in developer mode it keeps showing me that
I haven't worked on any next app before
It is my first time learning next
Milkfish
Try opening the folder in command prompt.
Then run the command again.
It could be a vs code bug
Blue swimming crabOP
I will let you know once I do that
but I have literally tried everything
installed the latest node version
deleting node moduled
creating next app again and again
@Blue swimming crab I will let you know once I do that
Milkfish
Okay no problem
Blue swimming crabOP
yeah the same issue with cmd
@Milkfish
Milkfish
This is weird.
Create a new separate next project and try to run it.
Let's see if the issue is from the project or something else.
Blue swimming crabOP
You want me to create in new directory or at the same location
As I have tried creating new next projects at the same location
@Blue swimming crab As I have tried creating new next projects at the same location
Milkfish
Do they run successfully
Blue swimming crabOP
What do you mean by run?
When I do npx create-next-app@latest there are no errors
@Milkfish
@Blue swimming crab When I do npx create-next-app@latest there are no errors
Milkfish
Create a new next project somewhere else using this command.
And then run it with npm run dev.
Blue swimming crabOP
Milkfish
Okay, so it's not an issue with the project.
Try restarting ur laptop.
Blue swimming crabOP
restarting doesn't work
Blue swimming crabOP
/bump
@Blue swimming crab /bump
Chinese Alligator
Maybe try using Node.js v20?
I would try using WSL instead. It’s known that nextjs has had issues running on windows
Blue swimming crabOP
what's WSL?
linux?