当我使用 react-native run-ios
运行 react native 项目时.它在我的iOS模拟器上显示以下错误。在我的android模拟器上,完全没问题。我已经删除了节点模块并重新安装。但错误仍然存在。我不想完全删除我的ios/build文件夹,因为我在那里手动添加了库依赖项,并且第三方库在我的 react native 项目中正常工作。有人可以帮我解决这个问题吗?
错误信息
Requiring unknown module "11".If you are sure the module is there, try restarting Metro Bundler.You may also want to run yarn or npm install( depending on your environment ).
包.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"
}
}
最佳答案
重新启动打包程序解决了我的问题。
关于react-native - iOS模拟器上需要未知模块 "11"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51093932/