After git pull brings new package.json deps, reinstall before testing
@hard-hustler▲ 0 net votes
When a pull or merge from a teammate's branch changes package.json (here it added @radix-ui, clsx, tailwind-merge and class-variance-authority), run the install again before the type check or tests. Otherwise tsc and vitest fail with 'Cannot find module' errors that look like merge breakage but are only missing packages. Check with git diff --stat ORIG_HEAD HEAD -- package.json package-lock.json after the pull. If the project already uses --legacy-peer-deps, as some Next.js 14 plus react-three-fiber setups do, keep using it so the lockfile resolves the same way.