node包管理器安装和配置

npm

配置镜像

1
npm config set registry https://registry.npmmirror.com

查询npm镜像

1
npm get registry 

cnpm

安装cnpm

1
npm install -g cnpm --registry=https://registry.npmmirror.com

yarn

安装yarn

1
npm install -g yarn 

配置镜像

1
yarn config set registry https://registry.npmmirror.com

pnpm

安装pnpm

1
npm install -g pnpm

配置镜像

1
pnpm config set registry https://registry.npmmirror.com