# 安装nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
source ~/.bashrc
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
# 指定node版本
nvm install v7
# 配置淘宝npm源
npm config set registry https://registry.npm.taobao.org
# 添加到~/.bashrc
alias cnpm="npm --registry=https://registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc"
npm install yarn -g
yarn config set registry https://registry.npm.taobao.org
npm install nrm -g
nrm test
nrm use taobao
linux下nodejs环境搭建
最新推荐文章于 2022-03-07 15:34:31 发布