Fixes · Deploys that break

“Could not resolve” on deploy, but it works on my computer

The build fails with Could not resolve './components/navbar' while the app runs fine locally. Usually it's capital letters: Mac and Windows ignore them, the build server doesn't.

What you see

The deploy fails with Could not resolve "./components/navbar" from "src/App.tsx" (or Module not found: Can't resolve), yet npm run dev and npm run build work on your computer.

Why it happens

The import says navbar and the file is Navbar.tsx. macOS and Windows treat those as the same name; the Linux machines that build your app don't. AI tools write mismatched capitals easily, and nothing on your computer complains. The other cause: the file was never committed.

How to fix it

  1. Find the file the error names, and compare its name with the import letter by letter.
  2. Change the import to match the file's name exactly (or rename the file).
  3. To rename a file only by capital letters in git, use git mv -f old new: a plain rename often isn't seen.
  4. Check the file is in the repository on GitHub, not only on your computer.

Or ask your AI tool to fix it

Paste this into Lovable, Bolt, v0, Replit or Cursor, and let it make the change.

My app builds on my computer but fails when deployed (on Linux) with "Could not resolve". Find every import whose path differs from the real file's name in capital letters, and make each one match the file exactly. Don't change anything else.

Don't change what the app does.
Never put a secret key or password in the code: read it from an environment variable.
If a step has to be done outside the code, like revoking a key in a provider's dashboard, list it for me at the end instead of skipping it.

How Launchpad helps

The launch check compares every import with the files in the repository and lists each one that would fail. If a deploy fails anyway, the console explains it in these words, with this request ready to paste.

Check your app for this, freeJoin the waitlist

Related