nhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache n

安装全局包时报错,以前已经遇到过,结果第二次又忘记解决方法,果真仍是要记下来,好记性不如烂笔头哇node

$ npm i electron -g
Unhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\f23044b6'
npm ERR! cb() never called!npm

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

 

这个错误是由于没有管理员权限,解决方法,右键点击开始菜单,选择以管理员身份运行,在打开的黑窗再继续安装就能够this

 

OK,安装成功blog

相关文章
相关标签/搜索