简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM