ios配置环境求助 不知道啥问题



  • 我是刚刚开始接触 mac上配置ios开发reactnative环境 配置完成后为啥一直报-bash: react-native: command not found !
    zhengjingqindeMacBook-Pro:~ zhengjingqin$ node -v
    v9.4.0
    zhengjingqindeMacBook-Pro:~ zhengjingqin$ brew info
    15 kegs, 9,888 files, 180.0MB
    zhengjingqindeMacBook-Pro:~ zhengjingqin$ brew -v
    Homebrew 1.5.2

    zhengjingqindeMacBook-Pro:~ zhengjingqin$ npm install -g yarn react-native-cli
    npm WARN deprecated yarn@1.3.2: It is recommended to install Yarn using the native installation method for your environment. See https://yarnpkg.com/en/docs/install
    /usr/local/Cellar/node/9.4.0/bin/react-native -> /usr/local/Cellar/node/9.4.0/lib/node_modules/react-native-cli/index.js
    /usr/local/Cellar/node/9.4.0/bin/yarn -> /usr/local/Cellar/node/9.4.0/lib/node_modules/yarn/bin/yarn.js
    /usr/local/Cellar/node/9.4.0/bin/yarnpkg -> /usr/local/Cellar/node/9.4.0/lib/node_modules/yarn/bin/yarn.js

    • yarn@1.3.2
    • react-native-cli@2.0.1
      updated 2 packages in 5.36s
      zhengjingqindeMacBook-Pro:~ zhengjingqin$ react-native init helloWold
      -bash: react-native: command not found

  • administrators

    brew link node


登录后回复