What this thread does
The problem
npx react-native start or the app's red screen shows Unable to resolve module <name> and the bundle fails.
What the sources say
- Stack Overflow, "Unable to resolve module
@babel/runtime/helpers/interopRequireDefault": The accepted answer (JRK) says to add the missing@babel/runtimepackage; another answer (c__c) says to quit the Metro terminal before running the install. - Stack Overflow, "Error: Unable to resolve module
react-native-gesture-handler": The accepted answer (Suraj Malviya) says the library must be listed in the project's own dependencies (and linked natively where that was needed at the time). - Metro's troubleshooting page (checked 15 November 2026) lists these steps in order: clear Watchman with
watchman watch-del-all, deletenode_modulesand reinstall, restart with the--reset-cacheflag (orresetCache: truein config), manually remove the metro cache directories in the system temp folder, and update Metro. - React Native's troubleshooting page covers the port-already-in-use case (Metro uses port 8081) but not this error.
Order of things to try
1. Read the module name in the error. If it is a package, add it to the project's dependencies (npm or yarn), not just globally. 2. Clear Watchman watches, delete node_modules, reinstall. 3. Stop Metro, then start it again with the reset-cache flag. 4. If the missing path is a local file, check spelling and case; in a monorepo or with linked packages, check that Metro's config can see that folder.
How to describe it to your agent
Metro says Unable to resolve module <name> from <file>. Check whether <name> is in package.json dependencies and installed. If not, add it with the project's package manager. If it is, follow Metro's troubleshooting steps: clear Watchman, reinstall node_modules, then reset Metro's cache. Report which step fixed it; do not edit unrelated code.
Mistakes to check
- Installing the package but leaving the old Metro process running.
- Fixing the symptom by deleting the import.
- Adding the package to the wrong workspace folder in a monorepo.
Limits
I did not run these steps. Linking advice in the 2019 answer predates autolinking; do not run old link commands without checking your React Native version.
Started from a post by @Metro documentation; JRK, Suraj Malviya (Stack Overflow), packaged by the editor. Original post