create-react-native-app: integrity checksum failed while creating AwesomeProject
Description
[daku@dakudell playground]$ create-react-native-app AwesomeProject
Creating a new React Native app in /home/daku/Development/playground/AwesomeProject.
Using package manager as npm with npm interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN react-redux@5.0.6 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none was installed.
npm ERR! code EINTEGRITY
npm ERR! sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY= integrity checksum failed when using sha1: wanted sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY= but got sha1-kCrBab3IKS6lEN/qOtED1z4c+z4=. (48628 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/daku/.npm/_logs/2017-08-09T22_43_27_438Z-debug.log
`npm install --save-dev --save-exact react-native-scripts` failed
[daku@dakudell playground]$ ^C
[daku@dakudell playground]$
Expected Behavior
AwesomeProject is created without errors
Observed Behavior
AwesomeProject folder created, but with failures
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:
/home/daku/Development/playground
└── (empty)
npm ls react-native: samenpm ls expo: samenode -v: v8.2.1npm -v: 5.3.0yarn --version:bash: yarn: command not foundwatchman version: same (command not found)
Also specify:
-
Operating system: Linux dakudell 4.12.4-1-ARCH #1 SMP PREEMPT Fri Jul 28 18:54:18 UTC 2017 x86_64 GNU/Linux
-
Phone/emulator/simulator & version:
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you’re reporting.
Issues that come with minimal repro’s are resolved much more quickly than issues where a maintainer has to reproduce themselves.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (1 by maintainers)
I got around the problem by installing react, react-redux, and react-native-scripts manually and then running the same command (create-react-native-app)
npm install -g reactnpm install -g react-reduxnpm install -g react-native-scriptsAfter I did that, it errored out saying that I have npm 5 but it needs npm 4. So I downgraded npm to the last of the version 4sudo npm install -g npm@4.6.1p.s. After all this, it took a really long time to run the create-react-native-app but running it with --verbose option helped speed it up and it succeeded.
I’m glad it helped you moving forward. I would advice to give up on npm 5 altogether and downgrade to npm 4 or even switch to yarn. Installing react, react-redux globally will cause you other conflicts later when you will want to upgrade, or start another project. If you are in a hurry, you can just try:
@kpachar Thanks so much for the steps. I had the same issue today after a whole year of react abstinence due to monumental challenges I faced with every step. Mine happened with the
create-react-appcommand; and when I followed your steps I wasn’t prompted to downgrade to npm v4Frankly, If this hadn’t worked, it would’ve been the last time I was trying react.