一、升级node
I found this really neat way of updating node on David Walsh's blog, you can do it by installing n
:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
It will install the current stable version of node.
二、升级npm
npm install npm@latest -g
三、升级npm下的库
npm update -g
npm update
FAQ:
npm cache clear --force
网友评论