npm install 真的不简单,你可能要额外配置这些。
发布于 9 年前 作者 zysam 5418 次浏览 最后一次编辑是 8 年前 来自 分享

npm 全局配置 镜像 node 的源码 , 编译时可能用到:

disturl = "https://npm.taobao.org/dist"

替换仓库

registry = "http://registry.npm.taobao.org/"

依赖中有 , url 指向 github 时 … (github 封了,只能配合代理上)

https-proxy = "http://127.0.0.1:8087/"
strict-ssl = false

bower install 当前项目的 .bowerrc 下添加:

"proxy": "http://127.0.0.1:8087",
"https-proxy": "http://127.0.0.1:8087",
"strict-ssl": false

只用 git 的 :

http.proxy=127.0.0.1:8087
https.proxy=127.0.0.1:8087
http.sslverify=false
6 回复

@pana 的nrm非常好用

@hezedu cnpm 能代理下载 github 的 url 吗?

@zysam 不晓得,不过github没被封吧,不然李院长怎么没跳出来?

@hezedu @zysam 没被封吧,只是比较慢。李院长现在都不在这个方面发声了,全段时间说自己得癌症,还被人怀疑是怕被整所以装病。

@alsotang 我试过大多的电信网络环境,都不能访问。移动网络环境倒是有时没问题。在广州。

回到顶部