全局安装Vue-cli报错operation not permitted

 

输入安装指令

npm install -g @vue/cli

报错如下
Unhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\66f42542'
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>

\

这是因为没有权限

找到nodejs右键使用管理员权限打开,从新输入安装指令,安装成功

 

posted @ 2019-12-25 09:27  潇湘羽西  阅读(3535)  评论(0编辑  收藏  举报