npm设置代理 以及 重定向


node.js通过npm安装模块,


npm的代理设置法:


npm config set proxy=http://192.168.0.2:8080

重定向其他镜像网站:
npm config set registry http://registry.npmjs.vitecho.com


或者在:~/.npmrc 加入下面内容

registry = http://registry.npmjs.vitecho.com


在安装node.js的模块时,有时候是下载源码需要本地安装编译,需要用到python以及C++编译器,因此在本机上最好有这些条件




猜你喜欢

转载自zybing.iteye.com/blog/1915411