create-react-native-app: 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 fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Suppor
t
npm WARN deprecated @exponent/spawn-async@1.2.8: 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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 44 (11 by maintainers)

Most upvoted comments

  1. install npm 4.6.1 or yarn 0.24.5
  2. run npm cache clean or yarn cache clean
  3. install create-react-native-app globally
  4. run create-react-native-app some-project-name

let me know if you still have this error. anyone who replies and does not clearly say “i tried the 4 steps” and indicate whether it was yarn or npm or both, then i will delete your comment, sorry.

Hi, on mac I had to put the following: sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288 Then it worked!

I hope it cannot dommage anything (new values are pretty high)…

Thanks for your help. It works now.

I installed watchman executed touch .watchmanconfig and git init then executed sudo sysctl -w fs.inotify.max_user_instances=1024 sudo sysctl -w fs.inotify.max_user_watches=12288

See this new issue: https://github.com/react-community/create-react-native-app/issues/382

try running npm set registry https://registry.npmjs.org/ it worked for me

Thanks a lot! @yogur solution worked for me

  • I installed watchman
  • executed touch .watchmanconfig and git init (sounds weird but is a must)
  • then execute
sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288

In my particular case i used 122288, since you have installed watchman the system tells you if this number is enought or have to be greater.

Try creating a project using another command: react-native init <projectname>

On Aug 27, 2017 3:50 PM, “Abed Kibbe” notifications@github.com wrote:

I uninstalled create-react-native-app with sudo npm uninstall -g create-react-native-app executed sudo npm clean cache --force then re-installed again. Still wont work 😕

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/react-community/create-react-native-app/issues/229#issuecomment-325182905, or mute the thread https://github.com/notifications/unsubscribe-auth/AUKE_54rq8wVKLKWEr2NBL9ixTCntAjdks5scR_XgaJpZM4NnZTJ .

try using react-native init <Project Name> instead of using create-react-native-app

try running npm cache clean or yarn cache clean, it seems like one of the tar downloads was interrupted