dickyj
dickyj

Reputation: 1870

Init a new project of react native fails

I just started with React Native with Mac OS, but unfortunately, the init of a new project failed. It somehow hangs:

This will walk you through creating a new React Native project in /Users/dickyjohan/Documents/Xcode Workspace/AwesomeProject
npm WARN engine [email protected]: wanted: {"node":"~0.10"} (current: {"node":"0.12.0","npm":"2.7.5"})

> [email protected] install /Users/dickyjohan/Documents/Xcode Workspace/AwesomeProject/node_modules/react-native/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

-

I thought it has a problem with ruby, but I have updated my ruby to the latest ruby 2.2.1p85. Does anyone know what went wrong?

Upvotes: 5

Views: 1985

Answers (2)

bengle
bengle

Reputation: 1

The depended package 'ws' has a wrong version,change it in package.json of react-native and try again.good luck!

Upvotes: 0

user4478383
user4478383

Reputation: 338

Trying installing node-gyp before:

npm install -g node-gyp

Upvotes: 1

Related Questions