23

unfortunately http://registry.npmjs.org/npm is down resulting in

$ 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

is there an alternative public repository, or any other way to continue working? Maybe using git clone for the dependencies?

Ralf

Morten Siebuhr
  • 6,068
  • 4
  • 31
  • 43
Ralf Sigmund
  • 517
  • 1
  • 4
  • 13

2 Answers2

12

Update: Every URL in this post is expired, sorry

Just found this link that lists some mirrors:

http://blog.modulus.io/npm-mirrors

The listed ones as of this writing are:

Specify the registry when installing:

$ npm install --registry http://registry.npmjs.org

Or update the registry permanently in the config:

$ npm config set registry http://registry.npmjs.org

groovenectar
  • 2,828
  • 3
  • 22
  • 26
  • 10
    Is it just me or are literally all of the links dead now? :/ – damd May 24 '17 at 09:20
  • Wow, pretty crazy... Well at this point you can also use Yarn -- https://yarnpkg.com/en/ for a drop-in replacement to NPM – groovenectar May 24 '17 at 15:37
  • 4
    @groovenectar Yarn is just a client, it still uses registry.npmjs.org as the server where it downloads from. – onlywei Dec 20 '18 at 18:31
  • @onlywei actually, yarn uses registry.yarnpkg.com – Maxim Mazurok May 03 '21 at 03:43
  • @MaximMazurok - which still relies on npm registry, at least for some packages. Currently blocked because npm is down, but we only use yarn – sirclesam Oct 07 '21 at 17:29
  • 1
    There are some mirrors: https://registry.npmjs.cf, https://registry.yarnpkg.com, https://registry.npm.taobao.org. But the first 2 seem to be very simple mirrors because they fail when https://registry.npmjs.org fails. – Finesse Nov 30 '21 at 08:43
10

There aren't any public alternatives, that I know of. At my company, we ended up doing an internal mirror, where we also publish our internal NPM packages.

I'm told it's not quite trivial - but definitely doable.

Morten Siebuhr
  • 6,068
  • 4
  • 31
  • 43
  • sounds interesting, maybe next time its up I can set up a public mirror. Did you follow any steps or guides when doing this? – Abe Petrillo Jan 05 '12 at 17:12
  • I didn't set it up, so I don't really know. – Morten Siebuhr Jan 06 '12 at 12:11
  • 1
    You can use [Artifactory](http://www.jfrog.com/confluence/display/RTF/Npm+Repositories) - unzip-simple proxy of npm regisrty – JBaruch Jun 01 '14 at 09:42
  • 2
    There is working Chinese NPM registry: http://registry.npm.taobao.org – mirik Aug 06 '20 at 11:29
  • @mirik Looks like they are proxying to the main repo and they aren't hosting the files themselves. They are down at the moment just like the official registry. – Rehmat Aug 31 '20 at 14:24