Module version mismatch. Expected 46, got 48.
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)
Hi, Looks like you compiled the module in a different version than the one you want to execute it.
Seems that installing with sudo or --unsafe-perm give this kind of error
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.
@roccomuso Could you confirm your node, npm and node-gyp versions?
node -v
npm-v
node-gyp -v
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"