vue安装手脚架npm install -g @vue/cli过程报错npm ERR! syscall mkdir

报错:

npm ERR! code EPERM

npm ERR! syscall mkdir

npm ERR! path D:\node.js\node_global

npm ERR! errno -4048

npm ERR! Error: EPERM: operation not permitted, mkdir ‘D:\node.js\node_global’

npm ERR! [Error: EPERM: operation not permitted, mkdir ‘D:\node.js\node_global’] {undefined

npm ERR! errno: -4048,

npm ERR! code: ‘EPERM’,

npm ERR! syscall: ‘mkdir’,

npm ERR! path: ‘D:\node.js\node_global’

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It’s possible that the file was already in use (by a text editor or antivirus),

npm ERR! or that you lack permissions to access it.

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

解决方法:

找到C盘下用户目录下的账户目录下的.npmrc文件,如果找不到试着打开隐藏的文件夹

1724012-ae8d2188de619a8f.png

删除以后重新安装成功

你可能感兴趣的:(vue安装手脚架npm install -g @vue/cli过程报错npm ERR! syscall mkdir)