NodeJS
NPM
npm 配置
- 指定全局安装路径
npm config set prefix "path"
- 指定缓存路径
npm config set cache "path"
- 配置镜像源(此处配置淘宝镜源)
npm config set registry=http://registry.npm.taobao.org
- 查看配置
npm config list
- 清除缓存
npm cache clean -f
Yarn
Yarn 安装与配置
- 安装Yarn
npm install -g yarn
- 配置淘宝镜像源
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
- 查看配置
yarn config list