我刚开始使用Mac OS的React Native,但不幸的是,新项目的init失败了。它以某种方式挂起:
This will walk you through creating a new React Native project in /Users/dickyjohan/Documents/Xcode Workspace/AwesomeProject
npm WARN engine stacktrace-parser@0.1.1: wanted: {"node":"~0.10"} (current: {"node":"0.12.0","npm":"2.7.5"})
> ws@0.4.31 install /Users/dickyjohan/Documents/Xcode Workspace/AwesomeProject/node_modules/react-native/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
-
我认为它与ruby有问题,但我已将我的ruby更新为最新的ruby 2.2.1p85。有谁知道出了什么问题?
答案 0 :(得分:1)
尝试安装node-gyp之前:
npm install -g node-gyp
答案 1 :(得分:0)
依赖的软件包'ws'有一个错误的版本,在react-native的package.json中更改它,然后再试一次。祝你好运!