If npm tries to install into C:\Program Files

After some uprade (VS 2015 update 3 install?) npm started to install packages into C:\Program Files\nodejs\node_modules, thus requirement admin rights and generally wrecking havoc. Previous installation location was

Npm people claim that this should never happen, while other people claim this happens like all the time. Long story short, this can be overridden by placing an .npmrc file in your home folder (C:\users\{username}) that says


Chances are your package store became corrupted (mine did), so run npm update after you change the prefix.

Leave a Reply

Your email address will not be published. Required fields are marked *