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):
Now, you can reference these packages from anywhere.
If you use other OS, check out this post on StackOverflow.