Create react app not working, file already exists with EEXIST error

25 Views Asked by At

I'm trying to install React for the first time and I'm getting the following error from my terminal:

~ % npm install -g create-react-app
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code EEXIST
npm ERR! syscall mkdir
npm ERR! path /Users/shibazhussain/.npm/_cacache/content-v2/sha512/12/7c
npm ERR! errno -13
npm ERR! EACCES: permission denied, mkdir '/Users/shibazhussain/.npm/_cacache/content-v2/sha512/12/7c'
npm ERR! File exists: /Users/shibazhussain/.npm/_cacache/content-v2/sha512/12/7c
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/shibazhussain/.npm/_logs/2024-03-29T16_46_46_875Z-debug-0.log
shibazhussain@Shibazs-MacBook-Air ~ % 


I tried the following so far:

  1. Using the clear cache command
  2. tried using npx instead of npm
  3. tried to uninstall react app before installing
  4. tried a $(whoami) / sudo chown command
  5. --force overwrite
0

There are 0 best solutions below