nhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache npm ERR! cb() never called!


安裝全局包時報錯,之前已經遇到過,結果第二次又忘記解決方法,果然還是要記下來,好記性不如爛筆頭哇

$ 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 ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>

 

這個錯誤是因為沒有管理員權限,解決方法,右鍵點擊開始菜單,選擇以管理員身份運行,在打開的黑窗再繼續安裝就可以

 

OK,安裝成功

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM