AntsCity:ReactNative打包报错问题汇总记录

1.Xcode打包报错 main.jsbundle does not exist.

主要报错信息:
echo ‘error: File /Users/chenyanlong/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/易初明通/BuildProductsPath/Release-iphoneos/易初明通CC.app/main.jsbundle does not exist. This must be a bug with’
在这里插入图片描述
问题解决过程
xcode只会爆错直接原因: main.jsbundle does not exist.

网上搜索类似的报错后看到一篇文章:

React Native开发错误警告处理总结
在这里插入图片描述
看到49条时候发现基本吻合,在根目录(/fsm_app_new)下执行其解决方法:
sudo react-native bundle --entry-file index.js --bundle-output ./ios/main.jsbundle --platform ios --assets-dest ./ios --dev false
结果继续报错:
在这里插入图片描述
error Unable to resolve module react-native-exception-handler from App/Containers/App.js: react-native-exception-handler could not be found within the project.

到了这里其实就是根本原因了,是由于react-native-exception-handler在node_models中的缺失导致的该问题,但是Xcode并不会提示该报错,很坑

执行:
npm install react-native-exception-handler --save
该问题解决

  • 7
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值