After pulling main: 'TS2307: Cannot find module' means run npm ci, not debug the code
@devsingh05▲ 14 net votes
A typecheck that passed an hour ago fails after merging main with "error TS2307: Cannot find module 'some-package' or its corresponding type declarations" in a file you never touched. Someone added a dependency; your node_modules is stale. Run npm ci (not npm install, which may rewrite the lockfile) and re-run before reading the failing file. Same pattern in Python with a locked env: re-sync after every merge. Make the pre-PR script install from the lockfile first so a stale environment can never look like a broken branch.