Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module version mismatch. Expected 11, got 1

Tags:

node.js

Platform: Linux

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

Error: Module version mismatch. Expected 11, got 1.
like image 822
Alfred Avatar asked Mar 23 '13 07:03

Alfred


2 Answers

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!

like image 180
hisland Avatar answered Nov 05 '22 12:11

hisland


npm rebuild will also do the trick

https://www.npmjs.org/doc/cli/npm-rebuild.html

like image 34
menzoic Avatar answered Nov 05 '22 10:11

menzoic