初始化React-native,执行run-ios报错了
本文介绍了初始化React-native,执行run-ios报错了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
第一跑react-native的脚手架,不知道怎么进坑了
我的操作过程就是
react-native init myApp
cd myApp
react-native run-ios
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/scdzs5/wh/project/hpApp/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/scdzs5/wh/project/hpApp/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/scdzs5/wh/project/hpApp/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/hpApp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/hpApp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
我应该怎么做呢?
解决方案
测试版本:
"react": "16.0.0-alpha.12",
"react-native": "0.45.0"
切换成下面的版本就可以了:
"react": "16.0.0-alpha.6",
"react-native": "0.44.3"
具体操作:删除node-modules文件夹,修改pakage.json文件,然后执行npm install
这篇关于初始化React-native,执行run-ios报错了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文