[英]react-native run-ios failing after recent updates
This method worked 1 month ago. 这种方法在1个月前就有效了。
running: 运行:
react-native run-ios
returns following error: 返回以下错误:
Scanning 557 folders for symlinks in /home/michal/WebstormProjects/ReactNativeSampleApp/sampleapp/node_modules (2ms)
Found Xcode project sampleapp.xcodeproj
spawnSync xcrun ENOENT
After revisiting this question this is now what I do when react-native fails to build a project on a virtual/real device. 在重新审视这个问题之后,现在我在做出反应时做了什么 - 本机无法在虚拟/真实设备上构建项目。
rm -rf ~/Library/Developer/Xcode/DerivedData
清除派生数据rm -rf ~/Library/Developer/Xcode/DerivedData
watchman watch-del-all
清晰的守望watchman watch-del-all
守望watchman watch-del-all
rm -rf node_modules
删除节点模块rm -rf node_modules
npm cache clean --force
清理npm缓存npm cache clean --force
rm -fr $TMPDIR/react-*
清洁临时目录rm -fr $TMPDIR/react-*
product -> clean
清洁ios构建product -> clean
Make sure that all libraries are linked: react-native link
确保链接所有库: react-native link
npm install
安装模块npm install
node node_modules/react-native/local-cli/cli.js start -- --reset-cache
(preferably manually from console because xcode does not reset cache) 运行dev服务器node node_modules/react-native/local-cli/cli.js start -- --reset-cache
(最好从控制台手动运行,因为xcode不重置缓存) react-native run-ios
构建项目react-native run-ios
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.