#Next not loading
1 messages · Page 1 of 1 (latest)
From the issues in the knowledge sources, Turbopack “unexpected error” / “Next.js package not found” problems are usually environment- or tooling-related rather than code-related, and they often persist even after reverting code or reinstalling dependencies.
One concrete workaround that resolved a very similar “Next.js package not found” Turbopack error was:
- Delete
node_modulesand your lockfile:rm -rf node_modules package-lock.json pnpm-lock.yaml yarn.lock - Clear the npm cache:
npm cache clear --force - Reinstall dependencies with npm (not pnpm/yarn), then run dev again:
In that case, the user suspected pnpm was the cause, and switching to npm fixed the Turbopack error and allowed Next.js to load again. [Turbopack package error]npm install npm run dev
If this doesn’t help and the dev server still fails with a “FATAL: An unexpected Turbopack error occurred” message, the Next.js team recommends creating a minimal reproduction (strip unrelated pages, dependencies, env vars, monorepo complexity) and opening a GitHub issue with the panic log file mentioned in the error. [Turbopack panic; Unexpected Turbopack]
Because the knowledge sources don’t include more specific debugging steps for your exact symptom beyond these, I can’t say with certainty what the root cause is in your project. If you can share:
- Your package manager (npm/yarn/pnpm)
- Next.js version
- The exact Turbopack error text from the terminal
I can try to map it more closely to one of the documented issues.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@low lichen Kapa.ai is still learning and improving, please let me know how I did by reacting below.