Reputation: 21
I am just running npx create-react-app my-app
and getting the following error :
Creating a new React app in D:\Other computers\My Laptop\Programming [P]\Web Development\Projects\my-portfolio\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code EEXIST
npm ERR! syscall mkdir
npm ERR! path D:\Other computers\My Laptop\Programming [P]\Web Development\Projects\my-portfolio\my-app\node_modules\.staging
npm ERR! errno -4075
npm ERR! EEXIST: file already exists, mkdir 'D:\Other computers\My Laptop\Programming [P]\Web Development\Projects\my-portfolio\my-app\node_modules\.staging'
npm ERR! File exists: D:\Other computers\My Laptop\Programming [P]\Web Development\Projects\my-portfolio\my-app\node_modules\.staging
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
I have tried:
Please help !
Upvotes: 2
Views: 3417
Reputation: 41
Try npm cache clean --force
. and I hope it good to go after that.
Upvotes: 4
Reputation: 437
If you don't want to overwrite the contents of my-app
directory, you can always choose a different name for your react-app. Something like this should work:
npx create-react-app myapp
However, if you are not bothered about the already existing directory you can do:
npx create-react-app my-app --force
Upvotes: 0