First open a command console at the location of your npm installation.
Then you can configure your npm to use a proxy using the commands:
npm config set proxy http://{url}:{port}
npm config set https-proxy http://{url}:{port}
Notice the protocol is set to http for both the proxy and https-proxy variables.
If you would like npm to store your credentials for the proxy, 
you can additionally modify the commands as follows:
npm config set proxy http://{username}:{passphrase}@{url}:{port}
npm config set https-proxy http://{username}:{passphrase}@{url}:{port}
For example:
npm config set proxy http://LanguidSquid:Password1@my.company.com:8080
npm config set https-proxy http://LanguidSquid:Password1@my.company.com:8080
Additional information here: Using npm behind corporate proxy .pac