On OSX, I need to use macports, because I run into issues with Brew. I uninstalled homebrew package manager and tried to get node to work:
I do a clean install of nodejs and npm
sudo port install nodejs npm
Let's just show that there is only npm installed, and no other modules.
$ ls /opt/local/lib/node_modules/
npm
Trying to get a node package working, testing with appdmg
sudo npm install -g appdmg
Now here's the cryptic error. (NOTE: It worked with brew's version of NPM, earlier this morning)
$ appdmg
module.js:460
return process.dlopen(module, path._makeLong(filename));
^
Error: Module version mismatch. Expected 46, got 47.
at Error (native)
at Object.Module._extensions..node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/appdmg/node_modules/macos-alias/lib/create.js:7:13)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)