centos 安装 node12以及yarn

  • 时间:2023.07.02 00:00
  • 来源:Unknown
  • 编辑:谋网北海
  • 阅读次数:1575

安装node 12

  1. curl -sL https://rpm.nodesource.com/setup_12.x | bash - 
  2. yum install nodejs 
 
安装yarn

  1. curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo 
  2. yum install yarn 
 
更换淘宝源

  1. npm config set registry https://registry.npm.taobao.org 
 
查看是否更换成功:
  1. npm config get registry 
 
如果要更换回官方源:
  1. npm config set registry https://registry.npmjs.org 
 


本站部分文章均来自互联网,具体由文章来源标注,如有侵犯您的权益请联系删除,谢谢!