安裝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,依舊按錯: