Metro could not find the file or package you imported. Install the dependency, correct the path, then restart Metro with --reset-cache.
- Package missing: run
npm install, and make sure the package is inpackage.jsonrather than only installed globally. - Wrong path or case: import paths are case-sensitive on CI and on Android even if your Mac is not.
- Moved or renamed file: restart with a cleared cache, since Metro may still hold the old path.
- Monorepo or symlinked package: Metro needs
watchFoldersandnodeModulesPathsinmetro.config.jsto look outside the app folder. - Native module: after installing a package with native code, rebuild the app; a JavaScript reload is not enough.
npm install
npx react-native start --reset-cache