Turbopack Error: Failed to write app endpoint /page #88060
Replies: 2 comments
-
|
This error is simple: Turbopack can’t resolve the next package from the project it’s building, so it fails when writing the /page endpoint.
Check your package.json in the folder where you run npm run dev: It must include "next" in dependencies (or devDependencies). node -p "require.resolve('next/package.json')"If that throws, Turbopack is right: Next isn’t resolvable. npm i next react react-dom
If you have a monorepo like: /repo
/apps/web <-- next app lives here
/packages/...Run from the app folder: cd apps/web
npm run dev
If you use pnpm or workspaces, next might be installed but not visible the way Turbopack expects. Ensure next is a dependency of the app itself (not only the root). Reinstall clean: rm -rf node_modules .next
pnpm install
pnpm devIf you’re on pnpm and using isolated node-linker, try: pnpm config set node-linker hoisted
pnpm install
This happens a lot when switching package managers (npm ↔ yarn ↔ pnpm). Fix (pick your package manager and stick to it) rm -rf node_modules .next package-lock.json yarn.lock pnpm-lock.yaml
npm install
npm run dev
If Next.js version: 0.0.0 shows up, you might be running a weird build or the wrong next is being picked up. which next
node -p "require('next/package.json').version" |
Beta Was this translation helpful? Give feedback.
-
|
This discussion appears to be a duplicate of #87816. Please follow the discussion there: #87816 This comment was added automatically by the discussion consolidation tool. If you believe this is in error, feel free to re-open the discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Turbopack version:
d1bd5b58Next.js version:
0.0.0Error message:
Beta Was this translation helpful? Give feedback.
All reactions