I installed nvm recently, and I get a warning that prefix setting is incompatible with nvm.
prefix
I set the prefix for download global modules to ~/.npm_glob
~/.npm_glob