在react-native init的时候报错,mac版本是10.11.6 rn的版本是react-native-cli: 2.0.1 react-native: 0.45.1 Xcode Version 8.2.1



  • The following commands produced analyzer issues:
    Analyze /Users/mac/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
    Analyze /Users/mac/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c

    (2 commands with analyzer issues)

    The following build commands failed:
    CompileC /Users/mac/Desktop/AwesomeProject/ios/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/StringBase.o /Users/mac/Desktop/AwesomeProject/node_modules/react-native/third-party/folly-2016.09.26.00/folly/StringBase.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    (1 failure)

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

    macdeMacBook-Pro:AwesomeProject mac$ !![

    ](image url)0_1497500682590_image.png

    新手,望回复



  • 建议先使用 0.44.3 版本,0.45.0版本问题很多,0.45.1据说修复了,但是经过简单试用还是有问题。既然是新手,简易你从已经证明稳定性没有问题的 0.44.3 开始,等新版本稳定后在升级。



  • 那您的意思就是 先降级试一下是吗,但是想问下现在是0.45.1 怎样降级呢



  • 降级遇到npm ERR! Unexpected end of input at 1:15017
    npm ERR! "^0.5.0","grunt-contrib-jshint":"^0.10.0","grunt-contrib-clean":"^0.5
    npm ERR! ^

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/zhouyong/.npm/_logs/2017-06-15T07_21_22_899Z-debug.log



  • 不要直接使用 react-native init ProjectName 创建项目,
    后面加个 --version 0.45.0 之前的版本就好了,
    比如:
    react-native init ProjectName --version 0.44.0



  • @Dzhijian 那如果我要打开一个项目,怎么加上版本号?



  • @Dzhijian zhouyongdeMacBook-Pro:reading-master zhouyong$ npm install
    npm ERR! Unexpected end of input at 1:15017
    npm ERR! "^0.5.0","grunt-contrib-jshint":"^0.10.0","grunt-contrib-clean":"^0.5
    npm ERR! ^

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/zhouyong/.npm/_logs/2017-06-15T09_32_23_675Z-debug.log
    zhouyongdeMacBook-Pro:reading-master zhouyong$ npm install --save react-native@0.18
    npm WARN deprecated babel-plugin-external-helpers-2@6.3.13: This was a temporary package since the package name was already taken. The package name was transferred for babel so we recommend using babel-plugin-external-helpers instead.
    npm ERR! Unexpected end of input at 1:15017
    npm ERR! "^0.5.0","grunt-contrib-jshint":"^0.10.0","grunt-contrib-clean":"^0.5
    npm ERR! ^

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/zhouyong/.npm/_logs/2017-06-15T09_34_44_686Z-debug.log
    zhouyongdeMacBook-Pro:reading-master zhouyong$ npm install
    npm ERR! Unexpected end of input at 1:15017
    npm ERR! "^0.5.0","grunt-contrib-jshint":"^0.10.0","grunt-contrib-clean":"^0.5
    npm ERR! ^

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/zhouyong/.npm/_logs/2017-06-15T09_39_39_974Z-debug.log
    zhouyongdeMacBook-Pro:reading-master zh
    wode



  • @zhouyong19901104
    npm install --save react-native@版本号。



  • @Dzhijian react-native: n/a - not inside a React Native project directory
    zhouyongdeMacBook-Pro:reading-master zhouyong$ npm install --save react-native@0.44.3
    npm ERR! Unexpected end of input at 1:15017
    npm ERR! "^0.5.0","grunt-contrib-jshint":"^0.10.0","grunt-contrib-clean":"^0.5
    npm ERR! ^

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/zhouyong/.npm/_logs/2017-06-15T09_49_53_513Z-debug.log
    zhouyongdeMacBook-Pro:reading-master zhouyong$



  • @zhouyong19901104 等版本更新吧 ,这个还不好解决.



  • @Dzhijian 说:

    --version 0.44.0
    下降版本了,就好用了,谢谢你!


>nein-mentioa faokmark-clearfokmarkmall>
an> map-m
an> menu">v in-mentioa efcn/usern" done=ull-left"> alert-w owe.cn/useasscriptne=b require(['forum/foPpd":17-0n,""c/i ":"square pointer dit-icon hidden">