NPM仓库的替代品:http://registry.npmjs.org/npm

24

很遗憾,http://registry.npmjs.org/npm无法访问,导致...

$ npm install mime
npm ERR! Error: ucs {bad_utf8_character_code}: mime
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:177:16)
npm ERR!     at IncomingMessage.emit (events.js:81:20)
npm ERR!     at HTTPParser.onMessageComplete (http.js:133:23)
npm ERR!     at Socket.ondata (http.js:1228:22)
npm ERR!     at Socket._onReadable (net.js:684:27)
npm ERR!     at IOWatcher.onReadable [as callback] (net.js:177:10)
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "mime"
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/rsi/projects/activiti.enricher/npm-debug.log
npm not ok

有没有其他公共存储库或任何其他方法可以继续工作?也许可以使用git clone获取依赖项?

Ralf


https://verdaccio.org/ - Lee
2个回答

12

10
所有的链接都挂了,是只有我一个人这样吗? :/ - damd
哇,相当疯狂...不过现在你也可以使用Yarn--https://yarnpkg.com/en/作为NPM的替代品。 - groovenectar
4
Yarn 只是一个客户端,它仍然使用 registry.npmjs.org 作为从中下载的服务器。 - onlywei
@onlywei 实际上,Yarn 使用 registry.yarnpkg.com。 - Maxim Mazurok
@MaximMazurok - 目前仍然依赖于npm注册表,至少对于一些包。目前由于npm宕机而被阻塞,但我们只使用yarn。 - sirclesam
1
有一些镜像站点:https://registry.npmjs.cf,https://registry.yarnpkg.com,https://registry.npm.taobao.org。但前两个似乎只是简单的镜像站点,因为当https://registry.npmjs.org失败时它们也会失败。 - Finesse

10

据我所知,没有公开的替代品。在我们公司,我们最终做了一个内部镜像,我们也发布我们的内部NPM包。

我被告知这不是很简单 - 但肯定可行。


听起来很有趣,也许下次我可以建立一个公共镜像。你在做这个的时候有遵循任何步骤或指南吗? - Abe Petrillo
我没有设置它,所以我不太清楚。 - Morten Siebuhr
1
你可以使用 Artifactory - unzip-simple 代理 npm 注册表。 - JBaruch
2
有一个可用的中文 NPM 注册表:http://registry.npm.taobao.org - mirik
@mirik 看起来他们正在代理到主要仓库,而不是自己托管文件。他们现在像官方注册表一样处于停机状态。 - Rehmat

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接