Npm 设置国内镜象

镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):

1.通过config命令
npm config set registry https://registry.npmmirror.com
npm info underscore (如果上面配置正确这个命令会有字符串response)

2.命令行指定
npm --registry https://registry.npm.taobao.org info underscore 

3.编辑 ~/.npmrc 加入下面内容
registry = https://registry.npmmirror.com

查看配置 
blob.png

修改时间 2024-09-06

声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
Node.js os 模块
Node.js crypto 模块
WordPress 文章页作者信息 get_the_author() 和 get_the_author_meta()
HTML input 元素
JavaScript 函数
WordPress 函数 add_option()、get_option() 和 update_option()
JavaScript DOM 文档对象模型
JavaScript 流式传输数据 SSE (Server-Sent Events)