Skip to content

Instantly share code, notes, and snippets.

@streunerlein
Created August 12, 2012 12:34
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save streunerlein/3331671 to your computer and use it in GitHub Desktop.
Save streunerlein/3331671 to your computer and use it in GitHub Desktop.
# 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
@streunerlein
Copy link
Author

UPDAte.

@streunerlein
Copy link
Author

Please note: This mirror is not meant to do npm publish, it's just a readonly mirror. And please don't mess up things in the db, i didn't close write access atm.

Another please: Contact me if you experience slowliness, I will then set up more mirrors and maybe a load balancer so we have only one domain for it.

@streunerlein
Copy link
Author

I'm seeing many 404 because people use the old url (with /registry). Make sure you use that one in the gist above, there has been an update.

@mren
Copy link

mren commented Aug 12, 2012

i'm getting a redirect to registry.npmjs.org


% npm install sendgrid
npm http GET http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/sendgrid/0.2.4
npm http 404 http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/sendgrid/0.2.4
npm http GET http://registry.npmjs.org/-/sendgrid-0.2.4.tgz
npm http 404 http://registry.npmjs.org/-/sendgrid-0.2.4.tgz
npm ERR! fetch failed http://registry.npmjs.org/-/sendgrid-0.2.4.tgz

do you know why this could happen?

@mren
Copy link

mren commented Aug 12, 2012

ah it is not found in your repository^^

@mxriverlynn
Copy link

failing to parse json from OSX 10.8 (Mountain Lion) w/ NPM 1.1.45

$ npm install
npm http GET http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/grunt-rigger
npm http GET http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/grunt
npm http 200 http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/grunt
npm ERR! registry error parsing json
npm http 200 http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com/grunt-rigger
npm ERR! registry error parsing json
npm http GET http://registry.npmjs.org/-/grunt-0.3.12.tgz
npm http 404 http://registry.npmjs.org/-/grunt-0.3.12.tgz
npm ERR! fetch failed http://registry.npmjs.org/-/grunt-0.3.12.tgz
npm ERR! Error: 404 Not Found

@tbigueres
Copy link

@tbigueres
Copy link

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/

@johankool
Copy link

Thanks @tbigueres!

@streunerlein
Copy link
Author

Mirror closed, npm working again.

@shreyaspadhye3011
Copy link

Hello

I'm also facing this issue very randomly while doing npm install using a docker file. Can this mirror be made available again, please?

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