Fix · Node, npm and build
Error: Cannot find module 'x'
What you may see
- The app crashes at start with Cannot find module
- It started after I pulled changes or moved files
Most likely cause
The package is not installed (or not listed in package.json), or the file path in the import is wrong.
Check first (about two minutes)
- Is the name in quotes a package (like express) or a file path (like ./utils)?
- For a package, check whether it appears in package.json and in node_modules.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find the import named in the error and tell me whether it is a package or a file.
- For a package: check it is a REAL package name (AI tools sometimes invent names); if real, run npm install <name> so it is saved in package.json.
- For a file: fix the path, the capital letters and the file extension that the project style needs.
- Run the app again.
Do not do this
- Do not delete node_modules as the first step.
- Do not install a package you cannot find on the official package list.