Node and NPM Configuration behind a Firewall

    These are the notes for using npm behind a company firewall and a windows roaming account. With the help of a former colleague these are the steps I have used. Most of my issues with a company firewall have been with a package not being downloaded or installed properly.

  1. ​​Install Node:
    1. NPM is bundled w/ Node
    2. https://nodejs.org/download/​
  2. Set your local proxy settings:
    1. ​run: setx HTTPS_PROXY http://YOUR-PROXADDRESS/
    2. run: setx HTTP_PROXY http://YOUR-PROXYADDRESS/
  3. Configure local NPM directories:
    1. run: npm config set prefix C:\Local\npm --global​
    2. run: npm config set cache C:\Local\npm-cache --global​
  4. Configure PATH so that we can execute the node binaries via command line
    1. run: setx PATH "%PATH%;C:\Local\npm"​
If none of these steps resolve the issue my final solution is to install the package directly from github itself which all you need to do is list the git repo inside package.json.
  • Failed to install tar-2.2.1: 403 error
    • npm install --no-registry
    • npm install module --cache

Popular posts from this blog

Nginx Best Practices Extended

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync