React Native & Expo errors · Error 01 of 12

“Unable to resolve module” in React Native / Expo

By Muhammad Abdullah, full-stack, mobile and ai automation developer · Last reviewed

Unable to resolve module <name> from <file>

Short answer

Metro, the React Native bundler, cannot find the file or package you imported. Install the missing package with npx expo install, check the import path and its exact letter case, then restart Metro with a cleared cache.

Common causes

  • The package is not installed, or was installed in a different folder of a monorepo.
  • The import path or filename case is wrong. macOS is case-insensitive, so ./Button may work locally but fail on EAS (Linux) if the file is button.tsx.
  • A stale Metro cache after installing, moving or renaming files.
  • A path alias (such as @/components) is set for TypeScript but not resolved by Metro/Babel.

How to fix it

  1. Install the package with Expo so you get a version compatible with your SDK:

                          npx expo install <package-name>
                        
  2. Check the import path and match the filename’s case exactly.

  3. Restart Metro and clear its cache:

                          npx expo start --clear
                        
  4. If you use aliases, make sure Metro resolves them too (Expo’s tsconfig paths support or babel-plugin-module-resolver), not only the TypeScript config.

Let’s talk about the next step

Have an idea, a stuck app, or a workflow toimprove?

Tell me what you are building, what is blocking you, and what a successful outcome looks like.