Error creating new app with "create-react-native-app"
Description
I tried to create a new react native app using the command "create-react-native-app" I'm using window 8. I got the following terminal error
D:\project>create-react-native-app crna
Creating a new React Native app in D:\project\crna.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Suppor
t
npm WARN deprecated @exponent/[email protected]: Please switch to @expo/spawn-as
ync, the new name of this package. It's the same code with our new name.
npm ERR! shasum check failed for C:\Users\ui-admin\AppData\Local\Temp\npm-3204-a
eacedd1\registry.npmjs.org\_40exponent\ngrok\-\ngrok-2.2.7.tgz
npm ERR! Expected: 37fe66f922b1003da2a78c66b7d4d3bc9313e423
npm ERR! Actual: d134060eb730b880da06d5c040ca933f6a75b613
npm ERR! From: https://registry.npmjs.org/@exponent/ngrok/-/ngrok-2.2.7.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ui-admin\AppData\Roaming\npm-cache\_logs\2017-05-26T09_36_
04_379Z-debug.log
`npm install --save-dev --save-exact react-native-scripts` failed
Any one met this error or fix it
same problem
Same problem using Ubuntu 16.04 (LTS).
jimmy@AppDev:~$ create-react-native-app my-app
Creating a new React Native app in /home/jimmy/my-app.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated @exponent/[email protected]: Please switch to @expo/spawn-async, the new name of this package. It's the same code with our new name.
npm ERR! Linux 4.8.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save-dev" "--save-exact" "react-native-scripts"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! shasum check failed for /tmp/npm-2099-bef3060c/registry.npmjs.org/_40exponent/ngrok/-/ngrok-2.2.7.tgz
npm ERR! Expected: 37fe66f922b1003da2a78c66b7d4d3bc9313e423
npm ERR! Actual: f7910be80cff8831a1570098b0fe0df4dab27be0
npm ERR! From: https://registry.npmjs.org/@exponent/ngrok/-/ngrok-2.2.7.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/jimmy/my-app/npm-debug.log
`npm install --save-dev --save-exact react-native-scripts` failed
jimmy@AppDev:~$
try running npm cache clean or yarn cache clean, it seems like one of the tar downloads was interrupted
Even i am facing the same issue. npm cache clean is also not working for me
which version of npm are you using?
@brentvatne I am using 5.0.3
this appears to be an issue that many people have run into with npm, see the issues on the npm repo: https://github.com/npm/npm/issues/16416
I recommend installing either yarn or the latest version of npm before 5 (npm5 is currently too buggy) -- so 4.6.1 as the time of writing this is probably the best npm version to use. yarn is great too though
@rishikahpowany - npm 5 is not supported, it is very buggy, it's in the project README and you should get a warning too if you use it
@brentvatne I tried updating npm. But it failed. I get a long list of error! Is there any other way?
@rishikahpowany - I have no idea without seeing the errors. npm 5 again is very broken currently and in my opinion should not be installed by default because of that. I recommend using yarn instead, it is a npm replacement. See: https://yarnpkg.com/en/docs/install
Same Problem npm version - v4.6.1 node version - v6.10.0 I have tried yarn also still got errors and I also tried npm cache clean command. still got the same error
Could you explain how you installed react-native? I recommend remove and re-install react-native again.
Same issue. I am having npm version 3.101.0 and node version 6.11.0
@kanak-infoObjects - please read the full thread, this appears to be a bug in old versions of npm, try updating to npm 4 or just use yarn, which is a replacement for npm and works better generally: https://yarnpkg.com/en/docs/install
@mminjiaa I didn't installed react-native instead I used npm install -g create-react-native-app
@DevPrasan1 - what npm registry are you using? what version of windows?
same problem with npm v 4.6.1 and node v 6.11.0
Sorry folks I don't really know anything about troubleshooting npm issues like this on Windows. I'd recommend going through the issues reported for this on the npm repository and see if any of the suggested solutions help you: https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=shasum%20check%20failed
using mac os sierra npm v 4.6.1 and still have this problem even using yarn
@brentvatne i am using windows 10