npx create-react-app – Error: EPERM: operation not permitted, mkdir ‘C:\Users\Kunsági~1’

run npm config edit to edit your config

Check your short username.If you want to be sure, you can use
dir /x in cmd

Kunsági~1 bad, KUNSGI~1 good


from: comment: g8up commented on Jan 16 2019 •

I’m on Windows 10 Professional. I got the same issue and I got it fixed by running the following commands in command prompt.

npm install -g create-react-app
npx create-react-app

Doing an
npm install -g create-react-app
isn’t really a solution per se, as the entire point of $ npx is to avoid the need for global installs. Modules like create-react-app change so frequently that they are typically out of date soon after installing them. So npx then allows you to execute a package without actually installing it, thereby ensuring that you are always using the latest cut of the module.

I had the same issue described above (EPERM) and the following thread – specifically the npm config set trick using ~1 – resolved the problem for me.

//npm uninstall -g create-react-app

C:\Users\Kunsági Zsolt\AppData\Roaming\npm-cache

npm config set cache “C:\Users\KUNSGI~1\AppData\Roaming\npm-cache” –global

//I can’t edit the config

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress