Repository navigation
Turbopack Error: failed to create junction point to ../../../node_modules/mongoose #93878
Replies: 2 comments
|
Hi @TubaJan, This is a Windows-specific error where Turbopack is trying to create a junction point (symlink) but the target already exists. This typically happens when previous build artifacts weren't cleaned properly or when switching between package managers. Quick fixes to try (in order): 1. Delete build artifacts and reinstall: # Stop your dev server first
rm -rf .next node_modules
rm package-lock.json # or yarn.lock / pnpm-lock.yaml
npm install
npm run dev2. If using Windows, run as Administrator: rmdir /s /q .next
rmdir /s /q node_modules
del package-lock.json
npm install
npm run dev3. Check for file system permissions:
4. If the issue persists, manually delete the junction: # Windows (CMD as Administrator)
rmdir node_modules\mongoose
npm install mongoose --force
npm run devAdditional questions:
The Reference: https://nextjs.org/docs/architecture/turbopack Let me know what works! |
|
Hi @TubaJan, This specific error (os error 80: The file exists) combined with "failed to create junction point" means you are running into a Windows-specific file system conflict inside Turbopack's cache. Why this happens: The Fix: Since you are on Windows, open your terminal (Command Prompt or PowerShell) and run these exact commands in your project's root directory:
DOS DOS DOS DOS |
Uh oh!
There was an error while loading. Please reload this page.
Turbopack version:
23c46498Next.js version:
0.0.0Error message:
All reactions