修改npm的registry为淘宝镜像(npm.taobao.org)

来源:https://cnodejs.org/topic/4f9904f9407edba21468f31e

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

1.通过config命令

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

2.命令行指定

npm --registry https://registry.npm.taobao.org info underscore 

3.编辑 ~/.npmrc 加入下面内容

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

搜索镜像: https://npm.taobao.org

建立或使用镜像,参考: https://github.com/cnpm/cnpmjs.org
时间: 2024-08-03 11:26:45

修改npm的registry为淘宝镜像(npm.taobao.org)的相关文章

修改npm包管理器的registry为淘宝镜像(npm.taobao.org)

http://www.cnblogs.com/passby/p/4744364.html?utm_source=tuicool&utm_medium=referral ************************************************** 起因 安装了node,安装了npm之后,官方的源实在是 太慢了! 看了看淘宝的npm镜像, http://npm.taobao.org/ 竟然说让我再下载一个cnpm,要不然就每次都得install的时候,后面加上--regist

npm 命令自动通过淘宝镜像源安装(MAC OS下)

在使用yoman的时候,发现一些命令中yoman 会自动执行npm命令,这个时候即使你安装了cnpm或者snpm都无济于事.整个安装进度还是会被卡住. 跟往常一样这一定跟墙没有关系,一定不是墙的锅. 如果能够让npm命令自动从淘宝镜像源来执行的话,不是就能解决这个问题了. 那么如何让所有npm命令直接通过淘宝镜像源来安装. 开启终端 输入 cd ~ atom .npmrc 这一句的意思是用atom打开 .npmrc文件.如果你没装atom,使用其他的编辑器打开也是一样的. 我打开的是个空的文件.

npm换源成淘宝镜像

由于node下载第三方依赖包是从国外服务器下载,虽然没有被墙,但是下载的速度是非常的缓慢且有可能会出现异常. 所以为了提高效率,我们还是把npm的镜像源替换成淘宝的镜像源.有几种方式供我们选择 使用cnpm 使用阿里定制的cnpm命令行工具代替默认的npm,输入以下代码 $ npm install -g cnpm --registry=https://registry.npm.taobao.org 检测是否安装成功 $ cnpm -v 安装成功之后,以后安装依赖包的方式和npm的是一样的,只是n

linux环境下NPM安装小结(淘宝镜像)

1.安装Nodejs 官网地址为http://nodejs.org 但国外地址下载太慢了,建议从淘宝下载(https://npm.taobao.org/mirrors/node/) wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.4.7-linux-x64.tar.gz 解压: tar -zxvf node-v4.4.7-linux-x64.tar.gz 设置环境变量: export PATH=$PATH:/opt/nod

npm和yarn的淘宝镜像添加

npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist npm config set electron_mirror https://npm.taobao.org/mirrors/electron/ npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sas

npm 国内淘宝镜像cnpm

某些插件很奇怪,需要用国内的镜像下载才可以 #安装淘宝镜像npm install cnpm -g --registry=https://registry.npm.taobao.org #使用淘宝镜像下载才可以使用cnpm install gulp-uglify --save-dev

npm安装删除模块以及cnpm淘宝镜像

npm安装模块 [$ npm install xxx]利用 npm 安装xxx模块到当前命令行所在目录: [$ npm install -g xxx]利用npm安装全局模块xxx: npm 删除模块 [$ npm uninstall xxx]删除xxx模块: [$ npm uninstall -g xxx]删除全局模块xxx: cnpm淘宝镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org

nodeJS安装及npm设置淘宝镜像

nodeJS安装及npm设置淘宝镜像 node.js安装 下载node.js安装包:https://nodejs.org/en/download/,下载相应版本的node.js. 需注意,在window中,node的安装目录中,最好不要有空格或中文字符. nodeJS的资源仓库在国内使用过程中,偶尔会遇到各种资源问题,通常设置为淘宝的镜像,网上很多说法是安装淘宝镜像,即 $ npm install -g cnpm --registry=https://registry.npm.taobao.or

yarn和node更改淘宝镜像

NPM.YARN更改淘宝镜像 查看当前计算机的下载地址 # npm命令 npm config get registry # yarn命令 yarn config get registry 修改为淘宝npm镜像 # npm命令 npm config set registry http://registry.npm.taobao.org/ # yarn命令 yarn config set registry http://registry.npm.taobao.org/ 修改为原始地址 # npm命令