Problem upgrading to latest Electron - nslog module version


I am trying to upgrade to the latest Electron. I get an uncaught exception when I run it:

The module ‘…/vendor/nslog/build/Release/nslog.node’ was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 53. Please try re-compiling or re-installing the module (for instance, using nom rebuild or npm install).

I have tried both of these, but I keep getting the same exception.
I do not get any errors installing/building nslog 3.0.0.

I started by doing npm install electron; npm install electron-rebuild; ./node_modules/.bin/electron-rebuild

This is on macOS 10.12.4 (Sierra).


I guess I can ask a more specific question: what is the difference between the node_modules directory and the vendor directory? What should I do about the apparent duplication of modules:



I think I found my problem.
I needed to add nslog to package.json as a dependency.
Apparently, that’s how electron_rebuild finds the modules to rebuild.