Setting Proxy NPM Install
Once you install Node.js on your computer and if you working on corporate proxy then you will have to set up proxy for NPM install.
- Open command prompt
- Run the following commands replacing USERNAME, PASSWORD, PROXY_ADDRESS and PROXY_PORT with your company proxy server.
- In some company you will have to include INTRANET/ before USERNAME. If above configuration doesn’t works try below:
Note: Don’t forget to replace special character to URL encoding. For example if your company adds intranet/ then it will be intranet%5C (%5C is URL encoding of /)
intranet/ = intranet%5C
Important: Sometime special character give problem making connection. If your user id contains @ please replace it with some other character $ will be good.
Where will be location of above configuration: File name: .npmrc
Location: Windows XP: C:\Documents and Settings\USERNAME\.npmrc
Windows Vista+: C:\Users\\USERNAME\.npmrc