npm config ls -l
默认安装源为https://registry.npmjs.org,更换为国内镜像地址之后,可以加快下载速度。
以下两种方式都可以。推荐第二种方式,一次设置,所有项目生效。
npm install aws-amplify --registry=https://registry.npmmirror.comnpm config set registry https://registry.npmmirror.com检查当前源:
npm config get registry
npm root -g
npm install -g pnpmpnpm store pathpnpm set registry "https://registry.npmmirror.com"