npm¶
Packages in home directory¶
This will let npm
use a custom directory for globally installed package.
# ...
export NPM_PACKAGES="${HOME}/.npm_packages"
PATH="${NPM_PACKAGES}/bin:${PATH}"
NODE_PATH="${NPM_PACKAGES}/lib/node_modules:${PATH}"
# ...
# ...
prefix = "${NPM_PACKAGES}"
# ...
$ . ~/.profile
$ npm install --global npm