美文网首页
React-Native iOS运行出错“NO bundle U

React-Native iOS运行出错“NO bundle U

作者: shiyueZ | 来源:发表于2018-07-26 12:47 被阅读0次

React-native iOS终端命令运行:react-native run-ios --simulator "iPhone 6s"出现红屏错误,错误信息如下:

No bundle URL present

Make sure you're running a packager server or have included a .jsbundle file in your application bundle

我这边的解决方案是先删除项目目录下的node_modules里的依赖包,然后重新下载node_modules,最后重新运行:react-native run-ios --simulator "iPhone 6s"命令,就可以打开应用了。

执行步骤

删除依赖包:rm -rf node_modules

重新下载:npm install

运行项目:react-native run-ios --simulator "iPhone 6s"

补充

运行项目可以直接输入:react-native run-ios,其默认打开的模拟器是iPhone 6,后面加上“--simulator”可以打开指定版本的模拟器!

最后插一句,觉得有用的同学,可以点个赞哟^ ^!!!

相关文章

网友评论

      本文标题:React-Native iOS运行出错“NO bundle U

      本文链接:https://www.haomeiwen.com/subject/wzfbmftx.html