npm相关配置

// 查看当前npm的相关配置
npm config list
或者
npm config ls

// 设置淘宝镜像
npm config set registry https://registry.npm.taobao.org

// 验证镜像地址是否设置成功,如果返回https://registry.npm.taobao.org,则说明镜像配置成功。
npm config get registry

// 设置module目录
npm config set prefix "D:\node-local-repo\node_global"

// 设置cache目录
npm config set cache "D:\node-local-repo\node_cache"
 

猜你喜欢

转载自blog.csdn.net/hety119/article/details/109591999
今日推荐