Skip to content
July 10, 2015 / windperson

Set NPM global module install location in Windows

To set global npm install location in windows: (here use D:\npm for example)

  1. Set those environment variables:

    Environment Variable Value
    npm_config_home D:\npm\home
    npm_config_prefix D:\npm
    npm_config_userconfig D:\npm\home\npmrc
  2. Create a text file called npmrc in D:\npm\home, which contains:

    save-prefix = ~
  3. Append the additional “D:\npm;” to %PATH% environment variable.

And now you can move the content in the %APPDATA%\npm folder to the new location D:\npm.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: