npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

midi module compilation error 2

Update on previous message - the error now occurs when I run nwjs:

I have installed the latest version of node for the Mac (v8.12.0) and have needed to re-install all the node modules for my project, including the midi module.

When I run nwjs (.33.4) to start my code (in index.html), I get an error message when the following is run:

var midi = require(‘midi’);

was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).

I did an npm rebuild, but got the same error.
I see that midi.js has an issue at the point where it runs:
var midi = require(‘bindings’);
I did a re-install of bindings, but got the same issue.

I overcame this by using the latest (non-LTS) version of node. At present I’m not clear how to determine the appropriate version of nwjs to use with a particular version of node. However, I believe that this needs to go onto an nw.js group.