almost 2 years ago

To reference globally installed NPM packages (i.e. packages installed with the "-g" option, like npm install -g webpack), a NODE_PATH has to be set in your environment. I used NVM to manage node.js and here is my setting (for Mac):

export NODE_PATH=/Users/cheng/.nvm/versions/node/v0.12.7/lib/node_modules

Now, you can reference these packages from anywhere.

If you use other OS, check out this post on StackOverflow.

← React.js learning note Create npm list shortcut →
comments powered by Disqus