Search code examples
node.jsangularnpm.npmrc

Configure global nprmrc file location in Windows


In Windows, I want to change the default global npmrc location, how can I do this?


Solution

  • I ran npm config set prefix C:\npm to change the prefix of the global npmrc location.

    And then npm config get globalconfig to get the exact expected global location (which is C:\npm\etc\npmrc).

    I navigated to this location and defined my global npmrc there (I had to create the etc folder myself.