Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module version mismatch. Expected 47, got 46. #11

Closed
Saarg opened this issue Jun 29, 2016 · 9 comments
Closed

Module version mismatch. Expected 47, got 46. #11

Saarg opened this issue Jun 29, 2016 · 9 comments
Assignees
Labels

Comments

@Saarg
Copy link

Saarg commented Jun 29, 2016

hi, i'm trying to use your module but i got this error:
Error: Module version mismatch. Expected 47, got 46.

any idea why?

@jduncanator
Copy link
Owner

There seems to be a few issues cropping up with newer versions of node, and node-gyp. I'll have some free time this weekend to sort them out.

@Camyll
Copy link

Camyll commented Oct 12, 2016

I keep getting this error:

Error: Module version mismatch. Expected 50, got 49.

has the previous issue ever been resolved?

@jduncanator
Copy link
Owner

@Camyll Yea, in the past people have fixed the issue by rebuilding their node-gyp modules. node-gyp rebuild should do the trick.

@Camyll
Copy link

Camyll commented Oct 12, 2016

This is not working for me :(

@jduncanator
Copy link
Owner

@Camyll Could you try the instructions listed here

@ak2766
Copy link

ak2766 commented Oct 29, 2016

I too am getting this issue on my daily driver laptop. However, on one of my LXC containers, it is working well. So I first compared versions:

LXC container (working):

$ npm -v
3.10.3

Laptop (errors out):

$ npm -v
3.10.9

I then compared the node_modules directory on both systems. All package.json files on the working LXC container have a line that says "_installable": true, while that line is missing on all package.json files on laptop.

Any ideas why? I think that downgrading npm may fix the issue, but why was that line removed?

EDIT: Forgot to mention that when I copy the node_modules from the LXC container into my laptop (thus negating the running of npm install command), my application runs just fine.

@jduncanator
Copy link
Owner

@ak2766 The issue stems from an issue with node-gyp trying to compile node-ffi and dependencies. By copying over your node_modules, you are essentially skipping the compilation step on your laptop and using the pre-built binaries generated in your container.

I've been doing some investigations over the last few weeks to try and get to the bottom of it, but it seems to be an issue within the node source tree, something not easy to fix. I'm in discussions with some people in the know on how we can address the issue.

@jduncanator
Copy link
Owner

It seems that this is caused by updating your Node version without rebuilding your Node modules. This makes sense as node-gyp compiles native modules against the currently installed version of node. Try following some of the steps here to see if it fixes your problem.

@jduncanator jduncanator added the bug label Dec 7, 2016
@jduncanator jduncanator self-assigned this Dec 7, 2016
@jduncanator
Copy link
Owner

As of version 0.2.0 diskusage now uses native, platform specific bindings. This should resolve any of the previous installation issues. If you are still experiencing issues, feel free to comment on this issue and I will take a further look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants