ReactNative踩坑系列--構建失敗

初始化項目後執行react-native run-ios,構建失敗:node

** BUILD FAILED **


The following commands produced analyzer issues:

    Analyze /Users/lcz/workspace/APP/temp/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/lcz/workspace/APP/temp/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

The following build commands failed:
    PhaseScriptExecution Install\ Third\ Party /Users/lcz/workspace/APP/temp/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/temp.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/temp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

上網查了不少資料沒有找到解決方案,估計是react-native版本的問題。react

測試版本:ios

"react": "16.0.0-alpha.12",
"react-native": "0.45.0"npm

切換成下面的版本就能夠了:json

"react": "16.0.0-alpha.6",
"react-native": "0.44.3"react-native

具體操做:刪除node-modules文件夾,修改pakage.json文件,而後執行npm installapp

 

注意:react版本要和react-native版本搭配,上面版本只換一個也會出錯dom

相關文章
相關標籤/搜索