Problem upgrading to latest Electron - nslog module version


#1

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).


#2

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:

./node_modules/fs-xattr/bin/darwin-x64-53/fs-xattr.node
./node_modules/fs-xattr/build/Release/xattr.node
./node_modules/nslog/build/Release/nslog.node
./vendor/nslog/build/Release/nslog.node
./vendor/xattr.node


#3

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.