node_pcap icon indicating copy to clipboard operation
node_pcap copied to clipboard

Module version mismatch. Expected 46, got 48.

Open roccomuso opened this issue 9 years ago • 5 comments

I'm having this error on Node v.4.4.7:

module.js:434
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: Module version mismatch. Expected 46, got 48.
    at Error (native)
    at Object.Module._extensions..node (module.js:434:18)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/user/Desktop/PROVE/pcap-test/node_modules/pcap/pcap.js:3:21)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

roccomuso avatar Jan 15 '17 21:01 roccomuso

Hi, Looks like you compiled the module in a different version than the one you want to execute it.

TincaTibo avatar Jan 16 '17 08:01 TincaTibo

Seems that installing with sudo or --unsafe-perm give this kind of error

roccomuso avatar Jan 16 '17 11:01 roccomuso

Check which node version you have in each environment. I had the issue with running Node on Docker with a different version than on the host, while mounting the filesystem for debugging => I was running inside container with node version X while module module was compiled in node version Y on the host.

TincaTibo avatar Jan 16 '17 12:01 TincaTibo

@roccomuso Could you confirm your node, npm and node-gyp versions?

node -v
npm-v
node-gyp -v

skepticfx avatar Jan 18 '17 02:01 skepticfx

Node: v4.4.0 Npm: v2.14.20 Node-gyp: (not globally installed, guess I'm using the one coming with node v4.4.0)

Trying to install with root privilege return this:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.0"

roccomuso avatar Jan 18 '17 12:01 roccomuso