📦Module not found
Module not found: Can't resolve 'framer-motion'
The code couldn't find the package or file it's trying to bring in (import).
🤔 Why does it happen?
- The package isn't installed (this often happens when the AI writes the code but doesn't install anything)
- The file path or name is wrong (including capital letters)
- The installed package isn't listed in package.json, so it's missing on the deployed site
🔧 Try this
- If the name in quotes is a package, run npm install package-name in the terminal
- If it's a file path starting with ./, check the real file location and spelling
- If it works on your computer but fails only when deployed, suspect a capital-letter difference (Mac and Windows don't care about capital letters, but servers do)
🤖 Ask your AI like this
I get the Module not found error below. If it's a package that needs installing, tell me the install command. If it's a path problem, fix it to the correct path. [Paste the full error here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Command not found
command not found - Package version conflict (ERESOLVE)
npm ERR! ERESOLVE unable to resolve dependency tree - Port already in use
EADDRINUSE: address already in use - Types don't match (TypeScript)
Type 'X' is not assignable to type 'Y' - No permission, so install failed (EACCES)
EACCES: permission denied - Node version doesn't match
The engine "node" is incompatible with this module - Out of memory (heap out of memory)
JavaScript heap out of memory - Can't use import statements (module settings)
SyntaxError: Cannot use import statement outside a module - Build failed on code checks (ESLint)
Failed to compile — ESLint errors - File or folder not found (ENOENT)
ENOENT: no such file or directory