react-native-cli is not compatible with npm@5
See original GitHub issueIs this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
:
react-native-cli: 2.0.1
react-native: 0.45.1
node -v
:
v8.1.1
npm -v
:
5.0.4
yarn --version
(if you use Yarn):0.23.2
Then, specify:
- Target Platform (e.g. iOS, Android): Whatever the result of
yarn start
is - Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
- Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Not relevant
Steps to Reproduce
Perform the first four steps outlined in the Getting Started (https://facebook.github.io/react-native/docs/getting-started.html) guide with a totally fresh React Native project.
npm install -g create-react-native-app
create-react-native-app AwesomeProject
cd AwesomeProject
npm start
Expected Behavior
I thought a dev server would run, or I would see the QR code mentioned in the Getting Started guide. I would expect react-native to be compatible with npm 5.0.4 or give instructions as to how to downgrade (not ideal). I wouldn’t expect it to just outright break.
Actual Behavior
➜ /Users/foo/TestApp npm start
> TestApp@0.1.0 start /Users/foo/TestApp
> react-native-scripts start
1:54:47 PM: Starting packager...
***ERROR STARTING PACKAGER***
Error: You are using npm version 5.0.4. Please use an npm version that is >= 3.0.0 and < 5.0.0.
1:54:47 PM: Error starting packager: Error: Couldn't start project. Please fix the errors and restart the project.
at /xdl/src/Project.js:1038:11
at Generator.next (<anonymous>)
at step (/Users/foo/TestApp/node_modules/xdl/build/Project.js:1468:191)
at /Users/foo/TestApp/node_modules/xdl/build/Project.js:1468:361
at <anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! TestApp@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the TestApp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/foo/.npm/_logs/2017-06-28T20_54_47_593Z-debug.log
Reproducible Demo
Explained above.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:28
- Comments:34 (6 by maintainers)
Top Results From Across the Web
NPM 5 is not supported yet in React Native - node.js
While creating an app using React native, in cmd I'm facing the following error message: ERROR: npm 5 is not supported yet. npm...
Read more >react-native-cli - npm
Start using react-native-cli in your project by running `npm i ... your local github clone into npm is not enough to test local...
Read more >Building Mobile App with React Native - Draft @ https ...
Create React Native App doesn't work with npm 5 yet, unfortunately. We recommend using npm 4 or yarn until some bugs are resolved....
Read more >These NPM tricks will make you a pro - freeCodeCamp
Grunt, gulp, react-create-app, react-native-cli and mocha are just a few. Before NPM 5.x you had to install these tools either as global ...
Read more >[React Native] 프로젝트 생성하기(create-react-native-app ...
ERROR : npm 5 is not supported yet ... Create React Native App doesn't work with npm 5 yet, unfortunately. We.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can downgrade npm with:
npm install -g npm@4
Quoting @johndanek again,
We understand that
react-native
orreact-native-cli
might not be responsible for the bug, but as the naive users, we do expect it to work gracefully.It’d be great if someone can explain the issue, rather than just telling us to downgrade. It would not only help us understand the issue, but we might be able to contribute as well. Even if can’t, we’ll be able to raise the issue in the right repository.