【发布时间】:2018-12-08 04:31:01
【问题描述】:
当我用react-native run-ios运行react native项目时。它在我的iOS模拟器上显示以下错误。在我的android模拟器上,完全没问题。我已经删除了节点模块并重新安装。但错误仍然存在。我不想完全删除我的 ios/build 文件夹,因为我在其中手动添加了库依赖项,并且第三方库在我的 react native 项目中正常工作。有人可以帮我解决这个问题吗?
错误信息
需要未知模块“11”。如果您确定该模块在那里,请尝试 重新启动 Metro Bundler。您可能还想运行 yarn 或 npm install( 取决于您的环境)。
package.json
{
"name": "AwwsomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-navigation": "^1.1.473",
"react-native-vector-icons": "^4.6.0"
},
"devDependencies": {
"babel-jest": "23.2.0",
"babel-preset-react-native": "4.0.0",
"jest": "23.2.0",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
【问题讨论】:
-
你再试试 npm install 吗?
标签: react-native react-native-ios react-native-navigation