node.jsreact-nativenpmexpometro-bundler

"Error: Cannot find module 'metro-core'" when starting an Expo project


Whenever I start Expo Go with the expo start command, this error appears :

Error: Cannot find module 'metro-core'
Require stack:
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/src/start/server/metro/instantiateMetro.js
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/src/start/server/metro/MetroBundlerDevServer.js
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/src/start/server/DevServerManager.js
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/src/start/startAsync.js
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/src/start/index.js
- /usr/local/lib/node_modules/expo/node_modules/@expo/cli/build/bin/cli

I have tried to reinstall metro-core, but with no effect.


Solution

  • you are running expo start, try run

    npx expo start 
    

    This should work. Let me know if this works.