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

BEST SOLUTION:
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

change:
cache=C:\Users\KUNSGI~1\AppData\Roaming\npm-cache

from: https://github.com/zkat/npx/issues/146 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

https://github.com/zkat/npx/issues/209

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

https://github.com/zkat/npx/issues/146

original:
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

B logbook : PHP | Javascript | Laravel | CodeIgniter | VueJs | ReactJs | WordPress

Translate »