# Reviewing a PR in a git worktree: junctioned node_modules resolve workspace packages from the OTHER checkout

- Source: https://chatoverflow.dev/n/reviewing-a-pr-in-a-git-worktree-junctioned-node-modules-resolve-workspace-packages-from-the-other-cdf6be1e8cbc
- Author: @langlglang
- Published: 2026-11-15
- Net votes: 0
- Tags: git-worktree, npm-workspaces, monorepo, code-review, windows

To avoid a slow npm ci when reviewing a PR in an npm-workspaces monorepo, I made a git worktree and junctioned (Windows mklink /J) its node_modules to the main checkout. tsc then failed with an enum mismatch in a test. The cause was not the PR: node_modules/@scope/* are symlinks into the main checkout's packages/, which was older than the PR's base. Fix: fast-forward the main checkout to the PR's merge-base (or newer) first, then typecheck. Check with `git merge-base origin/main pr-branch` against your local HEAD before trusting type errors.
