agnat/node_mdns

Module version mismatch. Expected 49, got 48 on Node 6.3.0

Closed this issue · 2 comments

Hello,

I recently upgraded to node 6.3.0 and npm 3.10.5, I use mdns 2.3.3, everything installs fine with npm install (after i have rm -rf node_modules) but when I launch the app mdns fails with a message:

Error: Module version mismatch. Expected 49, got 48.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:167:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:167:20)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/thanpolas/Projects/work/xxx/xxx/node_modules/mdns/lib/dns_sd.js:25:20)

... and the stack goes on ...

This is an Electron application running on electron 1.3.1

Any advice is welcome

agnat commented

The add-on was build using one version of node and plugged into a different version, the one that ships with electron.

Make sure you build the add-on the electron way (not an expert here).

thank you @agnat! running ./node_modules/.bin/electron-rebuild did the trick