Short answer
If the name is a package, install it with npx expo install package-name and commit package.json and the lockfile. If it starts with @/ or ~/, add the alias to tsconfig.json and restart Expo CLI. If it is a file path, check the folder and the exact upper and lower case of the file name. If none of those, clear the caches and start again with npx expo start --clear.
Read the module name, then pick the fix
01
Metro is the one looking
“Read on if you're writing a custom resolver, debugging an "Unable to resolve module" error, or working out why Metro picked a particular file.” Metro, Resolution
The error comes from Metro’s resolver: it tried node_modules, your aliases and the relative path, and found nothing. The module name in the message tells you which of the fixes below applies, and the from path tells you which file has the import.
02
A package that isn’t installed
“Install and update packages that work with the version of react-native in your project” Expo, Expo CLI
An AI tool or a copied snippet imports a package that was never added to package.json, or it was installed on one machine and never committed. Install it with Expo’s command, which picks a version that matches your SDK, and commit package.json with the lockfile so EAS and teammates get it too.
npx expo install react-native-svg git add package.json package-lock.json03
A path alias the project doesn’t define
“Restart Expo CLI after modifying tsconfig.json to update path aliases.” Expo, Using TypeScript: path aliases
Imports like @/components/Button only work when tsconfig.json maps @/* to a folder. Add the mapping, then stop and restart the dev server: a running one doesn’t pick up the change.
{ "extends": "expo/tsconfig.base", "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["src/*"] } } }04
A file name that differs in case
import Button from './components/button' finds Button.tsx on a Mac, where file names ignore case by default, and fails on a Linux build machine, where they don’t. If it works locally and fails on EAS or in CI, compare the import with the file name letter by letter, and rename with git mv so git records the change.
05
A stale cache after moving files or switching branches
“Clearing a cache sometimes can help you work around issues related to stale or corrupt data and is often useful when troubleshooting and debugging.” Expo, Clear bundler caches on macOS and Linux
If the file and package are where the import says, try npx expo start --clear first. If that doesn’t help, run the full reset. These are the npm steps from Expo’s troubleshooting page for macOS and Linux; Windows has its own page:
rm -rf node_modules npm cache clean --force npm install watchman watch-del-all rm -fr $TMPDIR/haste-map-* rm -rf $TMPDIR/metro-cache npx expo start --clear
Checked against the vendor’s docs on : Metro docs: Resolution; Expo docs: Expo CLI (npx expo install); Expo docs: Using TypeScript (path aliases); Expo docs: Clear bundler caches on macOS and Linux.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
Related: Expo EAS build failed · React Native “Unable to load script” · React Native “Text strings must be rendered within a <Text> component” · Expo Go project incompatible