错误当运行react-native run-ios时。错误:找不到模块“ metro-config”

时间:2019-07-24 04:27:25

标签: react-native react-native-ios

我正在使用react-native run-is命令通过终端运行React-native Project。我想在模拟器中运行它。首先,我运行npm install,然后运行react-native run-ios。显示错误

  

错误:找不到模块“ metro-config”   需要堆栈:   -/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

1 个答案:

答案 0 :(得分:1)

您似乎没有安装Metro-config模块。安装此模块。

npm i metro-config --save-dev