Alfred Alfred - 6 months ago 36
Node.js Question

Module version mismatch. Expected 11, got 1

Platform: Linux


When running my node.js program I got the following error

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

Answer

you might give the error like this:

Error: Module version mismatch. Expected 11, got 1.
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/node_modules/xml2json/node_modules/node-expat/lib/node-expat.js:4:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

and then, you can notice the error in module or somewhere.

this is because you have updated your node, you might rebuild the module found above.

i revole my question by reinstall(remove, then install) xml2json.

good luck!