Last Updated: February 25, 2016
·
1.307K
· leecrossley

Using npm in Europe

You may not know, but there's a European mirror (based in Germany) for the npm registry.

If you're in Europe, you'll find this mirror significantly faster (and seems to be more reliable).

To force the use of the European mirror simply append the --registry http://registry.npmjs.eu flag to the end of your command.

You could also setup an alias for convenience

$ alias enpm="npm --registry http://registry.npmjs.eu"

then usage is a simple as:

$ enpm install functional.js

I've gone into more detail (including how much faster this actually is) in my blog post.

2 Responses
Add your response

you can just do "npm config set registry http://registry.npmjs.eu" and it creates a .npmrc file with this setting, no need to add an alias

over 1 year ago ·

Thanks @filipebarros, good tip. I personally alias so I can PUT registry.npmjs.org when publishing.

over 1 year ago ·