You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
Update 2014-02-06: See npm.nodejs.org.au for updated instructions on how to set up your npm client to pull from the Australian mirror.
Installing from npm is always a pain from this side of the planet, particularly when you have a lot of dependencies to install and particularly when you've experienced it from a computer located in North America.
For a little while now I've been maintaining a mirror of the npm registry running out of the AWS datacentre in Sydney and it's an absolute pleasure to be able to npm install and have it complete in a couple of seconds. I'm now confident enough to share it with anyone else who would like to be able to do quick installs.
All you need to do is put this line in your ~/.npmrc file:
You won't be able to publish to it, so you have switch back to the standard registry to do that. You either have to remove or comment out that line, or be a little more clever.
Thankfully, @deoxxa has already thought of this and has a great script that I can recommend: npmrc.
Simply make a ~/.npmrcs/ directory and put alternative .npmrc files in it with names indicating their use. For example, I have one named write that uses the global registry and one called read that uses npm.nodejs.org.au. When I want to switch between them I just type npmrc read or npmrc write and it switches a symlink from ~/.npmrc to the appropriate file in ~/.npmrcs/.
(If you're running your own mirror, please continue to replicate from the global registry, Joyent can afford the bandwidth more than me.)