The node_modules That Wouldn't Die TL;DR - An internal app of mine refused to deploy because the build kept importing the wrong version of a Vite plugin. The lockfile said one thing, the build was doing another. I blamed the codegen. Then I blamed git. Both times I was wrong. The actual culprit was a node_modules directory sitting on the deploy host from a previous era of the project, surviving every git reset --hard because it was never tracked in the first place. Once I cleared that out, the build broke a second time for almost the same reason. Here is the story. The error that started it Deploy of an internal app of mine fails at the build step with this beauty: SyntaxError: The requested module './chunk-XYZ.js' does not provide an export named 'tanstackRouter' Enter fullscreen mode Exit fullscreen mode I knew this one. @tanstack/router-plugin renamed its main export from TanStackRouterVite to tanstackRouter at some point. The lockfile on main was pinned to a version where the new name was correct.…