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

删除以后重新安装成功

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容