清華大學npm鏡像正式公開
发布于 12 年前 作者 byvoid 15986 次浏览 最后一次编辑是 8 年前 来自 分享

清華大學開源鏡像站正式增加npm鏡像,具有教育網千兆帶寬,支持IPv6,歡迎使用。詳見:

http://mirrors.tuna.tsinghua.edu.cn/npm/ (已经挂了, 请使用 http://enpmjs.org/ 代替)

12 回复

好像有点问题?

npm --registry http://mirrors.tuna.tsinghua.edu.cn/npm/registry install express npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/express npm http 200 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/express npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/range-parser/0.0.4 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/connect/2.7.0 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/commander/0.6.1 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/mkdirp/0.3.3 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/cookie/0.0.5 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/crc/0.2.0 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/fresh/0.1.0 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/methods/0.0.1 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/debug npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/send/0.1.0 npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/cookie-signature/0.0.1 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/connect/2.7.0 npm http 200 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/commander/0.6.1 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/range-parser/0.0.4 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/cookie/0.0.5 npm http GET http://127.0.0.1:5984/registry/_design/app/_rewrite/commander/-/commander-0.6.1.tgz npm ERR! failed to fetch http://127.0.0.1:5984/registry/_design/app/_rewrite/commander/-/commander-0.6.1.tgz npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/mkdirp/0.3.3

npm ERR! Error: connect ECONNREFUSED npm ERR! at errnoException (net.js:670:11) npm ERR! at Object.afterConnect [as oncomplete] (net.js:661:19) npm ERR! npm ERR! If you are behind a proxy, please make sure that the npm ERR! ‘proxy’ config is set properly. See: 'npm help config’ npm ERR! npm ERR! System Darwin 11.3.0 npm ERR! command “node” “/usr/local/bin/npm” “–registry” “http://mirrors.tuna.tsinghua.edu.cn/npm/registry” “install” "express" npm ERR! cwd /Users/subdragon npm ERR! node -v v0.6.17 npm ERR! npm -v 1.1.24 npm ERR! syscall connect npm ERR! code ECONNREFUSED npm ERR! message connect ECONNREFUSED npm ERR! errno {} npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/crc/0.2.0 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/fresh/0.1.0 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/methods/0.0.1 npm http 200 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/debug npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/send/0.1.0 npm http 304 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/cookie-signature/0.0.1 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/subdragon/npm-debug.log npm not ok npm not ok

赞一个。不过也遇到错误了,不知道怎么排查…

➤➤ npm --registry http://mirrors.tuna.tsinghua.edu.cn/npm/registry info flow
npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/flow
npm http 401 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/flow
npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/flow
npm http 401 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/flow
npm ERR! Error: unauthorized Name or password is incorrect.: npm/registry/flow
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:14)
npm ERR!     at Request.init.self.callback (/usr/lib/node_modules/npm/node_modules/request/main.js:120:22)
npm ERR!     at Request.EventEmitter.emit (events.js:99:17)
npm ERR!     at Request.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/main.js:648:16)
npm ERR!     at Request.EventEmitter.emit (events.js:126:20)
npm ERR!     at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/usr/lib/node_modules/npm/node_modules/request/main.js:610:14)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:126:20)
npm ERR!     at IncomingMessage._emitEnd (http.js:366:10)
npm ERR!     at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
npm ERR!     at Socket.socketOnData [as ondata] (http.js:1367:20)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.6.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "--registry" "http://mirrors.tuna.tsinghua.edu.cn/npm/registry" "info" "flow"
npm ERR! cwd /home/chen
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/chen/npm-debug.log
npm ERR! not ok code 0
➤ npm --registry http://mirrors.tuna.tsinghua.edu.cn/npm/registry search row
npm WARN Building the local index for the first time, please be patient
npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/-/all
npm http 502 http://mirrors.tuna.tsinghua.edu.cn/npm/registry/-/all
npm ERR! registry error parsing json
npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/registry/-/all

應該已經解決了

應該已經解決了

good~速度很快:D

@byvoid 好快… 还有问题, 之后我 mv ~/.npmrc npmrc 然后执行命令成功了 有 .npmrc 情况下有 Error: unauthorized Name or password is incorrect.: 错误 .npmrc 文件内容

_auth = aml************
email = jiy*************

[_token]
AuthSession = aml5a************
version = 1
expires = 1353531647900
path = /
httponly = true

另外 npm search 本机不是教育网, 刷比较久… 放在教育网的服务器 info 是成功的, search 没对…

npm http GET http://mirrors.tuna.tsinghua.edu.cn/npm/-/all
npm http 404 http://mirrors.tuna.tsinghua.edu.cn/npm/-/all
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! <html>
npm ERR! <head><title>404 Not Found</title></head>
npm ERR! <body bgcolor="white">
npm ERR! <center><h1>404 Not Found</h1></center>
npm ERR! <hr><center>nginx/1.2.1</center>
npm ERR! </body>
npm ERR! </html>

这一条可能是我这边原因.再看下好了

感謝 fqj1994 的幫助。

我配置了 vhost,現在可以用 http://npm.tuna.tsinghua.edu.cn/registry 了,mirrors.tuna.tsinghua.edu.cn 會重定向到前者。

最新信息請關注:http://npm.tuna.tsinghua.edu.cn/

今天好像又不能使用了.

enter image description here

顶起, 继续努力.

回到顶部