需要未知模块“11"iOS模拟器上的错误 [英] Requiring unknown module "11" error on iOS simulator

查看:37
本文介绍了需要未知模块“11"iOS模拟器上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 react-native run-ios 运行 react native 项目时.它在我的 iOS 模拟器上显示以下错误.在我的 android 模拟器上,完全没问题.我删除了节点模块并重新安装.但错误仍然存​​在.我不想完全删除我的 ios/build 文件夹,因为我在那里手动添加了库依赖项,并且第三方库在我的本机项目中正常工作.有人可以帮助我用这个?

When I run the react native project with react-native run-ios.It shows the following error on my iOS simulator.On my android simulator, it is totally ok.I have deleted node module and reinstalled.But the error is still there.I don't want to entirely delete my ios/build folder since I have manually added library dependencies in there and that third party libraries were working properly in my react native project.Can someone help me with this?

错误信息

需要未知模块11".如果您确定该模块在那里,请尝试重新启动 Metro Bundler.您可能还想运行 yarn 或 npm install(取决于您的环境).

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 ).

package.json

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"
  }
}

推荐答案

重新启动打包程序修复了我的问题.

Restarting packager fixed my issue.

这篇关于需要未知模块“11"iOS模拟器上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆