gaze icon indicating copy to clipboard operation
gaze copied to clipboard

[0.6.4] Error: Module version mismatch. Expected 13, got 11.

Open javorosas opened this issue 11 years ago • 4 comments

Node 0.11 node-webkit 0.9.2 gaze 0.6.4 Ubuntu Gnome 14.04

I'm using the following code

var Gaze = require('gaze').Gaze;
var gaze = new Gaze('**/*', { cwd: (process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE) + '/MyFolder' }, function(err, watcher) {
    if (err) {
        console.log(err);
    } else {
        this.watched(function(watched) {
            console.log(watched);
        });
    }
}

And I'm getting this output for each file on the folder

Error: Module version mismatch. Expected 13, got 11.

When I change to 0.6.3 it works fine.

Any thoughts?

javorosas avatar Jun 04 '14 00:06 javorosas

Thanks for the error reports. Could you try on a stable version of node.js? v0.11 and odd versions are considered unstable.

Error: Module version mismatch. happens when a package is installed, then node.js is updated and the package has not been rebuilt for that version. Try npm rebuild first.

shama avatar Jun 04 '14 03:06 shama

Thank you for your response. I did try with Node 0.10.22 (which is included with the node-webkit 0.8.6 release) and this time the app crashes with the following output:

symbol lookup error: /tmp/.org.chromium.Chromium.42Rr5r/node_modules/gaze/build/Release/pathwatcher.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE

The thing to note here is that my app works fine with gaze 0.6.3 and Node 0.11.9

javorosas avatar Jun 04 '14 03:06 javorosas

Oh I glossed over the node-webkit part :)

To rebuild native addons for that, do npm install nw-gyp -g and rebuild (nw-gyp) from within the module folder (sorry its kind of a lame flow, I'm working on packaging pre-built binaries and maybe we can figure something out specifically for node-webkit).

See https://github.com/rogerwang/node-webkit/wiki/Using-Node-modules#3rd-party-modules-with-cc-addons

shama avatar Jun 04 '14 03:06 shama

Yeah, that solved this issue. Here's what I did:

$ npm install -g nw-gyp
$ npm install gaze
$ cd node_modules/gaze/
$ nw-gyp rebuild --target=0.9.2  # this is my version of node-webkit

Run the app again and all looks good.

Thank you!

javorosas avatar Jun 04 '14 03:06 javorosas