首页 > 其他分享 >React-native ios运行报错 No bundle URL present

React-native ios运行报错 No bundle URL present

时间:2023-12-13 14:47:35浏览次数:38  
标签:No URL ios jsbundle bundle -- 报错 main

新建项目报错如下:

需要手动生成ios下的main.jsbundle文件
解决方法:
1、生成main.jsbundle文件,在终端项目目录下执行:

react-nativebundle--entry-file index.js--bundle-output./ios/main.jsbundle--platform ios--assets-dest./ios--devfalse

或在 package.json 里面添加以下执行命令,终端执行yarn buildios即可生成main.jsbundle文件:

"buildios":"react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",

2、然后在xcode添加,然后重新打包就可以了

参考原文:https://www.jianshu.com/p/f3a09d2d49d2

标签:No,URL,ios,jsbundle,bundle,--,报错,main
From: https://www.cnblogs.com/ikuns/p/17898979.html

相关文章