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
该问题解决