can't install react native using npx react-native init AppName

Viewed 94

I try to initialize react native app but always got the error using npx react-native init AppName.

Need to install the following packages:
  react-native@0.69.0
Ok to proceed? (y) y
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/react-native
npm ERR! dest /Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-tr3sR9QU
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/react-native' -> '/Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-tr3sR9QU'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/risman/.npm/_logs/2022-06-27T14_07_36_253Z-debug-0.log

Error log: https://drive.google.com/file/d/1YEZGNVLf5aJzGzDoQaQWPzNi1NAUPezj/view?usp=sharing

1 Answers

Do what they tell you, rename /Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/react-native to /Users/risman/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-tr3sR9QU

Related