npm behind a proxy

If you're sitting behind a corporate proxy, chances are that you're facing some difficulties configuring npm.

The simplest commands to configure npm are :

npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port

In most cases this should work, if not then you should feel special 😁.

Case 1 : a special password

If your password contains special characters, then you must URL encode it, you can find a decent online encoder here.