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

相關文章
相關標籤/搜索