Next.js v15.2.2 Turbopack Dev server stuck in compiling + extreme CPU/memory usage #77102
Replies: 33 comments 17 replies
-
|
I'm experiencing the same issue. Dev server gets somehow stuck when using turbopack. |
Beta Was this translation helpful? Give feedback.
-
|
I also π CPU > 700% |
Beta Was this translation helpful? Give feedback.
-
|
Same issue for me (compiling loop) and I find a fix :
|
Beta Was this translation helpful? Give feedback.
-
|
I too am experiencing a similar issue after upgrading to 15.2.2. After running |
Beta Was this translation helpful? Give feedback.
-
|
I am also experiencing the same issue after upgrading to v15.2.2, v15.2.3 or v15.2.4. |
Beta Was this translation helpful? Give feedback.
-
|
I'm getting a variant of this of 15.2.3. It's absolutely insane. Everything will run fine for a little bit, then, randomly, it wall just hang and peg all of my cpu cores indefinitely. Restarted machine, cleared cache, etc. Nothing helps. |
Beta Was this translation helpful? Give feedback.
-
|
For us the issue (stuck in "compiling") is fixed after upgrading to v15.3.0 |
Beta Was this translation helpful? Give feedback.
-
|
We've also confirmed it works with version 15.3.0 after upgrading from 15.2.0. |
Beta Was this translation helpful? Give feedback.
-
|
This issue was resolved for us as well after upgrading to version 15.3.0. |
Beta Was this translation helpful? Give feedback.
-
|
Is there any word on what exactly was causing this? |
Beta Was this translation helpful? Give feedback.
-
|
I also have the same issue just right now. I use "next": "15.2.4" and it just fine/work normally for a few minutes before I restart "npm run dev" command. |
Beta Was this translation helpful? Give feedback.
-
|
There was one case we know of that caused an infinite loop with a specific combination of If you're not on 15.3 yet I'd highly recommend upgrading as it has more fixes as well. Still running into issues? Please grab a Turbopack trace using these instructions: https://nextjs.org/docs/app/building-your-application/optimizing/local-development#turbopack-tracing and share it here so we can have a look into it. |
Beta Was this translation helpful? Give feedback.
-
|
@timneutkens I noticed an issue with cycle detection with Turbopack (Next 15.3.3). For example:
The second file is incorrect - it references itself, which should be detected as a circular dependency. However, Turbopack didn't catch it. When I removed the |
Beta Was this translation helpful? Give feedback.
-
|
I faced same issue on latest version Next 15.4.6, after spending 3-4 days. I managed to resolve this downgraded next version to Next v15.3.0 and it works. |
Beta Was this translation helpful? Give feedback.
-
|
I got same issue on latest version too. After the first compile is done, next page is not compiled. |
Beta Was this translation helpful? Give feedback.
-
|
im having the same issue |
Beta Was this translation helpful? Give feedback.
-
|
For me it's caused by |
Beta Was this translation helpful? Give feedback.
-
β² Next.js 15.5.3 (Turbopack)
Creating an optimized production build ... thread 'tokio-runtime-worker' panicked at turbopack\crates\turbopack-ecmascript\src\lib.rs:2429:13:
Caused by:
Debug info:
] |
Beta Was this translation helpful? Give feedback.
-
|
Got the same issue with 16.1.1 so this is quite alarming. CPU, page memory and RAM at 100% bringing the machine to a halt. It seems to be caused by tailwind.css compilation, it spawns an infinite amount of nodejs processes |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Same here. The project was running smooth with Next 14. But as soon as i upgrade to 15 or 16 with React 19 it get stuck at "Creating an optimized production build..." So frustrating, been trying different node versions and debugging with ChatGPT. Nothing works, no logs of value etc.. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I got the same issue with I also use tailwindcss but am not sure that it was the cause. However, I managed to fix by removing |
Beta Was this translation helpful? Give feedback.
-
|
I'm on 16.1.6 and it's happening every time I do a production build. Machine becomes unresponsive; couldn't even ssh into it to check. |
Beta Was this translation helpful? Give feedback.
-
|
I don't know if it's the same issue everyone is talking about, but my compilation problem also started unexpectedly. The solution was to remove next.config.ts |
Beta Was this translation helpful? Give feedback.
-
|
I was seeing 500%+ CPU, 10GB+ memory growth, infinite "Compilingβ¦" in the client (mobile safari), requests taking 60+ seconds or infinite. Next.js 16.1.6 + Turbopack. Seems like Next had inferred the wrong workspace root. On startup I noticed this warning:
I had a stray Two-part fix that worked for me:
After both changes cold compile dropped from 60s+ timeouts to ~5s, warm requests to ~40ms, idle CPU back to ~0.1%, and memory back to normal. |
Beta Was this translation helpful? Give feedback.
-
|
I've encountered the same error in the
I've got 100% usage on my mac
the fix for that helped me is rm -rf node_modules
rm -rf .next |
Beta Was this translation helpful? Give feedback.













Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi!
We're currently running smoothly with Next.js v15.2.0 and recently tried upgrading to 15.2.2 but noticed the Turbopack dev server stopped working. We didn't update any other of our packages. Here's what happens:
After running
next dev --turbopackit's basically just stuck in compiling the page:The Webpack warnings were also present in v15.2.0 (where it works) and are coming from Sentry afaik.
Meanwhile CPU and memory are through the roof:
Even after waiting 10min, nothing happened. It's just stuck in some sort of loop somehow. No error message or anything. Memory just keeps piling up and it still says "compiling..."
Here's what I already tried to resolve the issue:
rm -rf node_modules+package-lock.jsonrm -rf .nextnpm install15.3.0-canary.6All of those result in the same endless compile loop.
Now, unfortunately this happens in our private company repo which I cannot share publicly, but I'm happy to provide more info or even invite a Vercel/Nextjs/Turbopack engineer to the repo to debug this if needed.
Any hints on what is going on here?
Cheers!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions