npm 升级 hexo butterfly

更换npm源

1
npm config get registry https://registry.npmjs.org/

查看npm源npm config get registry

由于registry.npmjs.org使用cloudflare,如果registry.npmjs.org无法ping通,尝试在hosts里写入

1
104.16.133.229 registry.npmjs.org

npm 升级 Hexo Butterfly

Win&&Linux

1
2
3
4
npm install -g npm-check-updates
ncu
ncu -u
npm install

Mac

1
2
3
4
sudo npm install -g npm-check-updates
ncu
ncu -u
npm install

换回淘宝源

1
2
npm config set registry https://registry.npm.taobao.org
npm config get registry