npm install => http error 404 #2694

Closed
cbou opened this Issue Aug 12, 2012 · 76 comments

Comments

Projects
None yet

cbou commented Aug 12, 2012

I have a problem installing any node module.

npm install -g express@3.0
npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/-/express-3.0.0rc2.tgz
npm http 404 https://registry.npmjs.org/-/express-3.0.0rc2.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/express-3.0.0rc2.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at null.<anonymous> (/home/charles/.nvm/v0.8.5/lib/node_modules/npm/lib/utils/fetch.js:47:16)
npm ERR!     at EventEmitter.emit (events.js:115:20)
npm ERR!     at WriteStream.flush (fs.js:1514:12)
npm ERR!     at fs.close (/home/charles/.nvm/v0.8.5/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:92:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
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.2.0-29-generic-pae
npm ERR! command "/home/charles/.nvm/v0.8.5/bin/node" "/home/charles/.nvm/v0.8.5/bin/npm" "install" "-g" "express@3.0"
npm ERR! cwd /home/charles
npm ERR! node -v v0.8.5
npm ERR! npm -v 1.1.46
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/charles/npm-debug.log
npm ERR! not ok code 0

any ideas ?

similar issue:

D:\code>npm install mongodb
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/-/mongodb-1.1.3.tgz
npm http 404 https://registry.npmjs.org/-/mongodb-1.1.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/mongodb-1.1.3.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at null.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\u
tils\fetch.js:47:16)
npm ERR!     at EventEmitter.emit (events.js:115:20)
npm ERR!     at WriteStream.flush (fs.js:1514:12)
npm ERR!     at fs.close (C:\Program Files\nodejs\node_modules\npm\node_modules\
graceful-fs\graceful-fs.js:92:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
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 Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongodb"
npm ERR! cwd D:\code
npm ERR! node -v v0.8.5
npm ERR! npm -v 1.1.46
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\code\npm-debug.log
npm ERR! not ok code 0

I am also having the same issue when trying to push to heroku.

-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
       Using Node.js version: 0.8.6
       Using npm version: 1.1.41
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
       npm http GET https://registry.npmjs.org/express
       npm http GET https://registry.npmjs.org/hjs
       npm http GET https://registry.npmjs.org/socket.io
       npm http 200 https://registry.npmjs.org/hjs
       npm http GET https://registry.npmjs.org/-/hjs-0.0.4.tgz
       npm http 404 https://registry.npmjs.org/-/hjs-0.0.4.tgz
       npm ERR! fetch failed https://registry.npmjs.org/-/hjs-0.0.4.tgz
       npm ERR! Error: 404 Not Found
       npm ERR!     at null.<anonymous> (/tmp/node-npm-3Gao/lib/utils/fetch.js:47:16)
       npm ERR!     at EventEmitter.emit (events.js:115:20)
       npm ERR!     at WriteStream.flush (fs.js:1514:12)
       npm ERR!     at fs.close (/tmp/node-npm-3Gao/node_modules/graceful-fs/graceful-fs.js:94:5)
       npm ERR!     at Object.oncomplete (fs.js:297:15)
       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 2.6.32-343-ec2
       npm ERR! command "/tmp/node-node-ucV9/bin/node" "/tmp/node-npm-3Gao/cli.js" "install" "--production"
       npm ERR! cwd /tmp/build_3ufphubzusm3m
       npm ERR! node -v v0.8.6
       npm ERR! npm -v 1.1.41
       npm http 200 https://registry.npmjs.org/socket.io
       npm http GET https://registry.npmjs.org/-/socket.io-0.9.10.tgz
       npm http 200 https://registry.npmjs.org/express
       npm http GET https://registry.npmjs.org/-/express-3.0.0rc2.tgz
       npm http 404 https://registry.npmjs.org/-/socket.io-0.9.10.tgz
       npm ERR! fetch failed https://registry.npmjs.org/-/socket.io-0.9.10.tgz
       npm http 404 https://registry.npmjs.org/-/express-3.0.0rc2.tgz
       npm ERR! fetch failed https://registry.npmjs.org/-/express-3.0.0rc2.tgz
       npm ERR! 
       npm ERR! Additional logging details can be found in:
       npm ERR!     /tmp/build_3ufphubzusm3m/npm-debug.log
       npm ERR! not ok code 0
 !     Failed to install --production dependencies with npm
 !     Heroku push rejected, failed to compile Node.js app

npm is down for me too.. =/

Contributor

reggi commented Aug 12, 2012

here here

Same here. First time to play around with npm. I thought I installed the npm incorrectly.

I can access the files with my browser... but npm can´t .... port closed?

I think we have to wait and meanwhile play some classic games 👾 or go outside ☀️.
Hopefully someone fixes the server soon :)

@ThomasDeutsch: I can't access the files with my browser, e.g. 404 at https://registry.npmjs.org/-/connect-2.4.3.tgz

What is this "classic games" and "outside" you speak of? oh, googling it..

similar issue here

npm install socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm http GET https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm http GET https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/socket.io-0.9.10.tgz
npm ERR! Error: 1073873872:error:1408D108:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature length:../deps/openssl/openssl/ssl/s3_clnt.c:1617:
npm ERR!
npm ERR! at CleartextStream._puller (tls.js:608:24)
npm ERR! at CleartextStream.CryptoStream._pull (tls.js:542:19)
npm ERR! at SecurePair.cycle (tls.js:832:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:220:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! at Socket.EventEmitter.emit (events.js:88:17)
npm ERR! at TCP.onread (net.js:395:14)
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 2.6.31.6_SMP_820
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /root
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

I don't want to go outside

i wish npm was distributed and didn't have single point failure

Yup, NPM is down.

npm http GET https://registry.npmjs.org/mongoose
npm http 304 https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/-/mongoose-3.0.1.tgz
npm http 404 https://registry.npmjs.org/-/mongoose-3.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/mongoose-3.0.1.tgz
npm ERR! Error: 404 Not Found

Definitely hope that the registry will become distributed moving forward!

Npm is a single point of failure, we really need to setup npm public mirrors.

ich commented Aug 12, 2012

I know it in registry, but on npm install caffeine http GET https://registry.npmjs.org/-/caffeine-0.2.4.tgz returns {"error":"not_found","reason":"document not found"}, so +1

Same here... and I thought it was my proxy settings...

C:>npm install -g brunch
npm http GET http://registry.npmjs.org/brunch
npm http 304 http://registry.npmjs.org/brunch
npm http GET http://registry.npmjs.org/-/brunch-1.4.1.tgz
npm http 404 http://registry.npmjs.org/-/brunch-1.4.1.tgz
npm ERR! fetch failed http://registry.npmjs.org/-/brunch-1.4.1.tgz
npm ERR! Error: 404 Not Found

+1:
Console:

npm http 404 https://registry.npmjs.org/-/redis-0.7.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/redis-0.7.2.tgz

URL Return (https://registry.npmjs.org/-/redis-0.7.2.tgz):

{"error":"not_found","reason":"document not found"}

+1

framp commented Aug 12, 2012

Workaround: http://registry.npmjs.org/npm/-/npm-1.1.48.tgz

Prepend the /package-name/ before the -

I'm getting 404s also

Contributor

scien commented Aug 12, 2012

:(

@framp How can this be done with the npm install command?

At least the error message need to be correct -

@TiddoLangerak
Just address the tarball directly and add the package name (ie redis) right before the /-/ part:

npm install https://registry.npmjs.org/redis/-/redis-0.7.2.tgz

You'll have to install all dependencies manually though, which can get quite messy depending on the package you need

rsdrsd commented Aug 12, 2012

The best thing to do is to wait untill npm is up again!

roldan commented Aug 12, 2012

completely agree!

Please tell me if you need more server power

@streunerlein thank you very much!

Unfortunately it is not working for me, e.g. 404 at http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/registry/express

Sorry, wrong address. See in the GIST again - without /registry

should work fine then, please test thank yiou!

works! thank you so much ❤️

now we have to automate this process and distribute the npm registry

neosam commented Aug 12, 2012

@streunerlein you are absolutely great! Thanks so much!!!

yeah, cannot guarantee it'll handle if more people use it today - it's a single server @aws now. Will build a load balancer and more servers if needed.

@streunerlein how old is the registry you're hosting on amazon? Does it include all packages or just a subset?

@ghost

ghost commented Aug 12, 2012

Is it possible to get my Heroku app to use this mirror?

@niclashoyer It's a snapshot from npmjs.org which should update itself. However: the process is still ongoing, which means that the newest versions of some modules will be available during today. It's about 7-8 gigs to transfer, this takes a while.

@coatesjable I have no idea, try it and report! Thanks :D

rsdrsd commented Aug 12, 2012

Did someone contact the owner of this service?

We did via twitter.. Seems not to be available on sundays.

Another note: Just checked, not all modules are on the server and not all versions. But it's all still updating, so maybe try again later.

@ghost

ghost commented Aug 12, 2012

I can use the mirror. Not sure if its got all the versions of the available packages yet as I get addon version can't be found for some modules.

The way I got Heroku to use the mirror is by including a .npmrc file in the root of my application (next to my .gitignore) and in the file I included the following line:

registry = "http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/"

Now when I push to Heroku I can see it fetching data from the mirror:

npm http 200 http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/express-namespace

Some people are getting 404 when trying to fetch specific versions of the packages - e.g. if u have a package.json with versions in it (which is very common ;)). I found the bug and will correct it.

@coatesjable Thanks!

Yes, I just updated and fixed the bug - rerunning again

Ok, i think i can say everything works now, mirror complete.

Gi-lo commented Aug 12, 2012

@streunerlein Thank you very much it's working perfectly for me :)

i still can't fetch express@3.0.0.

I've just found a workaround, posting it in a minute

hughsk commented Aug 12, 2012

If you're still having trouble with the mirror, here's something you can run locally to fix it: https://github.com/hughsk/npm-quickfix :)

Owner

mmalecki commented Aug 12, 2012

Hey folks. I wrote and deployed a simple proxy. It works and you can install modules.

npm install <module> --registry http://165.225.128.50:8000

If you feel like telling the world, please retweet.

I think that the problem is in the CouchApp not returning tarballs correctly. However, I might be mistaken.

framp commented Aug 12, 2012

BTW, if I'm not mistaken, this is not a bug in npm, it's in npmjs which is returning an incorrect tarball url.

Eg:
http://registry.npmjs.org/npm
{"shasum":"3b9d5ea8fbfd852bdbb6b5af6cc949e72feef069","tarball":"http://registry.npmjs.org/-/npm-1.1.48.tgz"}

@hughsk hehe just did that similarily, but using php:

.htaccess:

RewriteEngine on
RewriteRule ^.*$ index.php [NC]

index.php:

<?php
$request = $_SERVER["REQUEST_URI"];
$url = "http://registry.npmjs.org" . $request;
$packageArray = explode("/", $request);
$package = $packageArray[1];

$contents = file_get_contents($url);
$contents = str_replace("http://registry.npmjs.org/-/$package", "http://registry.npmjs.org/$package/-/$package", $contents);
die($contents);
?>

breadmj commented Aug 12, 2012

Oh.. npm was down. I wondered if my computer is going crazy. super thanks, @streunerlein !

rsdrsd commented Aug 12, 2012

proxy not working!

hmm.. getting errors when installing "dnode", also getting old version of "dnode-protocol"..

You can use this mirror (which fetches the original content from registry.npmjs.org). All modules up to date:

npm set registry http://85.10.209.91/

To reset:
npm set registry http://registry.npmjs.org/

@tobiasstrebitzer Thanks! that worked!

Owner

mmalecki commented Aug 12, 2012

@romansky I did few fixes, it didn't work with dashes and dots in the name. Works now.

@mmalecki Thanks for the effort! but I already got what I needed

Contributor

reggi commented Aug 12, 2012

Both of these registries work, thanks to @tobiasstrebitzer and @mmalecki.

npm set registry http://85.10.209.91/
npm set registry http://165.225.128.50:8000

I collected the proxies/mirrors I know atm here, maybe we can keep this list for later. https://gist.github.com/3332181

Please add urself if you have setup a running proxy/mirror :)

Any idea when npm will be up again?

According to iris couch, it should https://twitter.com/iriscouch/status/234653854124363777

But... I still have errors here sometimes.

Am Sonntag, 12. August 2012 um 19:13 schrieb Joakim Berglund:

Any idea when npm will be up again?


Reply to this email directly or view it on GitHub (isaacs#2694 (comment)).

ich commented Aug 12, 2012

The problem is gone. I've just installed packages from default registry.

edit: but now I still can't download my tar https://registry.npmjs.org/-/caffeine-0.2.4.tgz

the new tarball url's have the package name before the versonized filename:
https://registry.npmjs.org/caffeine/-/caffeine-0.2.4.tgz

ich commented Aug 13, 2012

Sorry, I've just F5 on the page. Now it's clear.

cbou commented Aug 16, 2012

Can we close this issue now ?

@ghost

ghost commented Aug 16, 2012

+1

yes

On Thu, Aug 16, 2012 at 2:55 PM, charles bourasseau <
notifications@github.com> wrote:

Can we close this issue now ?


Reply to this email directly or view it on GitHubhttps://github.com/isaacs/npm/issues/2694#issuecomment-7780550.

Owner

isaacs commented Aug 19, 2012

@streunerlein Thank you so much for the list :)

isaacs closed this Aug 19, 2012

Owner

isaacs commented Aug 19, 2012

If anyone is still having issues with this, npm cache clean should make them all go away.

#Try this first
npm set registry https://registry.npmjs.org/
# use the npm mirror:
npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com
# you can reset this later with npm set registry npm set registry https://registry.npmjs.org/
# then use it normally:
npm install express

the above doesn't work for me, still getting this.

othiym23 added the support label Sep 21, 2014

lsegal referenced this issue in aws/aws-sdk-js Oct 17, 2014

Closed

2.0.20.tgz has a bad shasum check. #388

Even after using

"npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com"

I got the following error.

npm ERR! Error: failed to fetch from registry: learnyounode
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:209:10)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at Socket.onend (http.js:1188:13)
npm ERR! at TCP.onread (net.js:369:26)
npm ERR! You may report this log at:
npm ERR! http://bugs.debian.org/npm
npm ERR! or use
npm ERR! reportbug --attach /home/satya/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "learnyounode"
npm ERR! cwd /home/satya
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: learnyounode
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/satya/npm-debug.log
npm not ok

@y12uc231 the npm mirror at ec2-46-137-149-160.eu-west-1.compute.amazonaws.com is no longer maintained and has been shut down (https://gist.github.com/streunerlein/3332181#comment-397123)

Try resetting your registry to https://registry.npmjs.org and try again, download learnyounode here works fine.

vrunoa commented Jul 8, 2015

I have the same problem when using a vagrant machine.
Got fixed by,
npm set registry http://registry.npmjs.org/

Make sure you have GIT installed properly( GIT, node on 64 bit system/32 bit system) I was stuck in that issue. Silly of me :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment