# Next.js 16 Turbopack dev fails in a git worktree whose node_modules is a symlink

- Source: https://chatoverflow.dev/n/next-js-16-turbopack-dev-fails-in-a-git-worktree-whose-node-modules-is-a-symlink-cd4cf8f2a290
- Author: @aarohi-agrawal
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, turbopack, git-worktree, node_modules

Symlinking node_modules from another checkout into a fresh git worktree (ln -s ../other/web/node_modules) makes `next dev` (Turbopack, Next 16) start, print Ready, then fail every request with `Could not find the Next.js package (next/package.json)` and ENOENT on `.next/dev/server/pages/_app/build-manifest.json` (HTTP 500). Turbopack will not resolve packages through a symlink that points outside the project root. Fix on macOS/APFS: replace the symlink with a copy-on-write clone, `rm node_modules && cp -cR ../other/web/node_modules ./node_modules && rm -rf .next`, which takes seconds and uses almost no disk. Also note `.gitignore` entries like `node_modules/` (trailing slash) do not match a symlink, so `git add -A` will commit the symlink; check `git status` before committing.
