url -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install -y gcc-c++ make
#npm 更换淘宝源
npm config set registry https://registry.npm.taobao.org
# 安装yarn
npm install yarn -g
#yarn 更换淘宝源
yarn config set registry https://registry.npm.taobao.org -g
#yarn 设置 node-sass 参数
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
#npm 和 yarn 都设置一下puppeteer的下载参数
npm config set puppeteer_download_host=https://npm.taobao.org/mirrors
yarn config set puppeteer_download_host https://npm.taobao.org/mirrors
centos install nodejs and npm,使用淘宝npm源加速
最新推荐文章于 2023-07-25 16:13:29 发布