ingsaurabh ingsaurabh - 1 year ago 648
Node.js Question

Module version mismatch. Expected 49, got 48

I am using Electron module mdns and I am getting this error

A JavaScript error occurred in the main process
Uncaught Exception:
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> (/home/ingsaurabh/dp/node_modules/mdns/lib/dns_sd.js:24:20)

Uninstalled node module and reinstalled, but not working

Answer Source

Since mdns contains a native Node module you must rebuild it to target your version of Electron, there are a couple of ways to do this. I'd suggest using the electron-rebuild approach.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download