question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node 6.0.0 error: "Module version mismatch. Expected 48, got 47"

See original GitHub issue

I don’t have any particular clue here.

$  local-npm
/Users/josh/npm/lib/node_modules/local-npm/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: Module version mismatch. Expected 48, got 47.
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at bindings (/Users/josh/npm/lib/node_modules/local-npm/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Users/josh/npm/lib/node_modules/local-npm/node_modules/leveldown/leveldown.js:4:46)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lidakiscommented, Jun 28, 2016

TehShrike I have a working solution for you. I had exact the same problem as you and I found out the following.

If you use pouchdb in node like this var PouchDB = require(‘pouchdb’); the npm package is not updated to the latest version of pouch db code.

solution:

  1. Go to node_modules/pouchdb/lib/index.js
  2. Open that file.
  3. Then go here and copy the whole code and paste it in index.js file (node_modules/pouchdb/lib/index.js).
  4. save the file (index.js).
  5. Run your app.

This worked for me with node6 as well as in node webkit 0.15.4 with any version of npm that you referred and also with the latest. I think is not leveldown or npm issue.

Hope this helps.

Best Regards.

0reactions
jtlindseycommented, Aug 11, 2016

@lidakis I just did a npm install --save pouchdb on a new electron project and had the same issue. Then I used your solution but grabbed the current version of pouchdb that mached my package.json "pouchdb": "^5.4.5" and it worked.

Im on Linux using

npm -v
3.10.3
node --version
v6.3.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

ursa with node 6.0.0 Error: Module version mismatch. Expected 48 ...
I was able to get 0.9.3 installed with Node 6.0.0. Running on OSX (10.11.4). When I add require('ursa') and run the project it...
Read more >
Node.js – Error: Module version mismatch. Expected 48, got 46.
Hello all,. This error is generated by the fact that you just upgraded a your major Node.js version, which is good, and your...
Read more >
Bountysource
Node 6.0.0 error : "Module version mismatch. Expected 48, got 47"
Read more >
Node v8.0.0 (Current)
npm, Inc. recently announced the release of version 5.0.0 of the npm ... fix space for module version mismatch error (Yann Pringault) #10606 ......
Read more >
Node Module Version Mismatch - RationalDev
module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ Error: Module version mismatch. Expected 48, got 57.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found