I am running React-native Project by terminal using react-native run-is command. I want to run it in simulator. first I run npm install ,then react-native run-ios. It showing error
Error: Cannot find module 'metro-config' Require stack: - /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/util/Config.js - /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/core/index.js - /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cliEntry.js - /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cli.js - /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/cli.js - /usr/local/lib/node_modules/react-native-cli/index.js
You seem to have no Metro-config module installed. Install this module.
npm i metro-config --save-dev

Add metro.config.js to your root project folder and add the following:
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const config = {};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With