mac环境更新node版本

执行命令:

清除node的cache(清除node的缓存)

sudo npm cache clean -f 

安装"n"版本管理工具,管理node(没有错,就是n)

sudo npm install -g n 

 

 

更新node版本

sudo n stable 

 

 

更新npm版本

sudo npm install npm@latest -g 

 

 

 

参考地址:

https://www.jianshu.com/p/c32f646b3345

posted @ 2019-12-13 15:16  最爱小虾  阅读(412)  评论(0编辑  收藏  举报