美文网首页
npm registry

npm registry

作者: SailingBytes | 来源:发表于2021-07-14 11:12 被阅读0次

1、npm临时

npm --registry=https://registry.npm.taobao.org install ***

npm install --registry=https://registry.npm.taobao.org

***指要下载的依赖,这种属于临时下载依赖;***为空代表临时改变镜像下载package依赖。

2、npm永久

npm config set registry https://registry.npm.taobao.org

配置后可通过下面方式来验证是否成功

npm config get registry 或 npm info ***

3.通过cnpm使用

npm install -g cnpm --registry=https://registry.npm.taobao.org

4、在根目录下编写~/.npmrc文件

registry = https://registry.npm.taobao.org

NODE_OPTIONS=--max-old-space-size=4096

5、使用nrm管理npm的镜像

nrm具体操作

相关文章

网友评论

      本文标题:npm registry

      本文链接:https://www.haomeiwen.com/subject/edcypltx.html