I have installing react app using this command
$ npx create-react-app my-app
Then I got Error like this:
Error: EPERM: operation not permitted, mkdir 'C:\Users\Aniket'
command not found: create-react-app
I have seen some online resources they are saying I have to remove space from my Windows Username, isn't there any other way of make this work?
Make sure you've node>=8.10 and npm>=5.6 already installed
Try installing it globally first, using the command
npm install -g create-react-app
And then, you can create your app using the command,
npx create-react-app <Name of your app>
Hope this helps :)
Edit: Above solution might work but it's not recommended way of solving this issue. Please refer https://create-react-app.dev/docs/getting-started
I referred the solution given at bottom and some other posts to use below command: npm config set cache "C:\Users\mycomputer~1name\AppData\Roaming\npm-cache" --global
Go to c:/users open command prompt and run dir /x
check shorter name you found with dir/x as shown in image and run npm config set cache "C:/Users/<shortname-you-found-with-dir/x>/AppData/Roaming/npm-cache" --global
In my case it's CYBERC~1.
this works fine in my case.
The easiest way for me is:
mkdir C:\cache
npm config set cache "C:\\cache"
And then run the command again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With