thecodingmachine / react-native-boilerplate

A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.66k stars 852 forks source link

[BUG]: Unable to create a RN project, getting error #421

Closed ibiren closed 3 months ago

ibiren commented 3 months ago

react-native environment setup

Description

npx react-native@latest init MyApp --template @thecodingmachine/react-native-boilerplate

Upon running this, got the following on Terminal

Need to install the following packages: react-native@0.74.0 Ok to proceed? (y) y npm ERR! code EEXIST npm ERR! syscall rename npm ERR! path /Users/chbsubud/.npm/_cacache/tmp/3f17faad npm ERR! dest /Users/chbsubud/.npm/_cacache/content-v2/sha512/cf/d4/2352ef79a512aefc9d5870c0f2f6f44cfcaa0f915782a8de17f0eca275d17d32232c4ab645e9bc8be37119a7c792099032e5d9e62fb84522ccf4bc2667b3 npm ERR! errno EEXIST npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/@sinonjs%2fcommons: EACCES: permission denied, rename '/Users/chbsubud/.npm/_cacache/tmp/3f17faad' -> '/Users/chbsubud/.npm/_cacache/content-v2/sha512/cf/d4/2352ef79a512aefc9d5870c0f2f6f44cfcaa0f915782a8de17f0eca275d17d32232c4ab645e9bc8be37119a7c792099032e5d9e62fb84522ccf4bc2667b3' npm ERR! File exists: /Users/chbsubud/.npm/_cacache/content-v2/sha512/cf/d4/2352ef79a512aefc9d5870c0f2f6f44cfcaa0f915782a8de17f0eca275d17d32232c4ab645e9bc8be37119a7c792099032e5d9e62fb84522ccf4bc2667b3 npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in: /Users/chbsubud/.npm/_logs/2024-05-01T07_43_30_022Z-debug-0.log

Version

4.1.3

Do you use TypeScript?

On which OS this issue appear on?

Desktop OS

MACOS

ibiren commented 3 months ago

clearing npm cache resolved it