nodejs版本升級大坑!

 安裝axios時報錯:

$ npm install -save axios
Unhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\071f96b7'
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版本太舊的原因,於是上網搜更新node的方法,

發現只有到node官網重裝纔有用。

官網地址:https://nodejs.org/zh-cn/,選擇適合自己電腦的安裝包,下載好之後安裝,一路next即可。

 node版本升級成功

 繼續安裝axios,依舊按錯:

後用管理員身份運行命令提示符(cmd),再繼續安裝axios,安裝成功:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章