See http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation
For modules you use in the shell, `npm install -g` is the way to go, but if you're using a module in an application by `require`ing it, it should be installed locally (that is to say, without `-g`
I also did not get aphlict to run by only installing `ws` globally. I //had// to install it locally, in `support/aphlict/server` - which was the second option the docs, but probably is the only option that works reliably.