安装问题,命令不能用



  • C:\Program Files\nodejs\node_modules\npm>npm install react-native-cli
    npm notice created a lockfile as package-lock.json. You should commit this file.

    • react-native-cli@2.0.1
      added 25 packages in 3.016s

    C:\Program Files\nodejs\node_modules\npm>react-native -v
    'react-native' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。

    C:\Program Files\nodejs\node_modules\npm>npm -v
    5.3.0

    C:\Program Files\nodejs\node_modules\npm>node -v
    v8.5.0



  • C:\Windows\system32>npm install -g react-native
    npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
    C:\Users\shuijing\AppData\Roaming\npm\react-native -> C:\Users\shuijing\AppData\Roaming\npm\node_modules\react-native\local-cli\wrong-react-native.js
    npm WARN react-native@0.48.3 requires a peer of react@16.0.0-alpha.12 but none was installed.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\react-native\node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

    • react-native@0.48.3
      added 691 packages in 45.778s

    C:\Windows\system32>react-native -v
    'react-native' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。


登录后回复