全局安装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右键使用管理员权限打开,从新输入安装指令,安装成功

猜你喜欢

转载自www.cnblogs.com/steamed-twisted-roll/p/12094921.html
今日推荐