npm命令
1.配置镜像
npm config set registry http://registry.cnpmjs.org npm info underscore (如果上面配置正确这个命令会有字符串response)
2.淘宝镜像cnpm安装与卸载
npm install -g cnpm --registry=https://registry.npm.taobao.org //安装 npm config delete registry //卸载 npm config delete disturl
3.代理设置与移除
npm config set proxy http://server:port npm config set https-proxy http://server:port npm config set proxy http://username:password@server:port //认证 npm confit set https-proxy http://username:password@server:port npm config delete proxy 取消代理 npm config rm proxy //移除代理 npm config rm https-proxy
4.npm版本更新
npm i -g npm npm install --registry=https://registry.npm.taobao.org
文章
总共 0 条评论