react-native - iOS模拟器上需要未知模块 "11"错误

标签 react-native react-native-ios react-native-navigation

当我使用 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 ).



Error Message on iOS

包.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/

相关文章:

android - 在 react-native-navigation 中从单屏应用到基于选项卡的应用

react-native - 在 xcode 中运行 react native,我的错误屏幕是白色的。看不到错误信息

ios - 运行react-native运行ios时,如何配置运行哪个xcodebuild工具版本?

ios - React Native项目版本升级报错: v0. 56 to v0.60,iOS失败

ios - 为什么命令 `pod install` 或 `pod update pod_name` 会安装这么多文件?

javascript - React Native 深层链接应用程序从后台打开

ios - 代理 : trap returned descriptor for property '0' that is incompatible with the existing property in the proxy target 上的“getOwnPropertyDescriptor”

javascript - 将react-native-navigation与redux结合使用时,应用程序未注册错误

react-native - 如何在 React Native 的 renderItem 函数中获取 FlatList 元素的高度

android - 如何改变 native 布局方向?