执行命令:

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

sudo npm cache clean -f 

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

sudo npm install -g n 

mac环境更新node版本

 

 

更新node版本

sudo n stable 

mac环境更新node版本

 

 

更新npm版本

sudo npm install npm@latest -g 

 mac环境更新node版本

 

 

参考地址:

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

相关文章:

  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案