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

Error: Module version mismatch. Expected 46, got 14. #183

Closed
ye opened this issue Oct 22, 2015 · 18 comments
Closed

Error: Module version mismatch. Expected 46, got 14. #183

ye opened this issue Oct 22, 2015 · 18 comments

Comments

@ye
Copy link

ye commented Oct 22, 2015

It seems that Aglio is not compatible with the latest node.js due its dependency lib protagonist and drafter are not compatible with the latest version of node.

Got this after upgrading node.js to 4.2.1

$ aglio -i v1.apib -o v1.html
module.js:460
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: Module version mismatch. Expected 46, got 14.
    at Error (native)
    at Object.Module._extensions..node (module.js:460:18)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/aglio/node_modules/drafter/lib/drafter.js:5:15)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
$ aglio -v
module.js:339
    throw err;
    ^

Error: Cannot find module 'protagonist'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/aglio/node_modules/drafter/lib/drafter.js:5:15)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

$ node -v
v4.2.1
$ npm -v
3.3.8
@danielgtaylor
Copy link
Owner

@ye we are working on pushing a new release shortly that will support 3.x and 4.x. The fix (upgrading the nan library) is already complete, it is just waiting on a release.

@ye
Copy link
Author

ye commented Oct 22, 2015

@danielgtaylor thanks for the update!

@artlogic
Copy link

Protagonist has pushed 1.1.1 which compiles on node 4. What's the ETA for the next aglio release?

@danielgtaylor
Copy link
Owner

@artlogic I'm working on it today, just had to get Protagonist 1.1.1 out first to fix a bug! 😄

@artlogic
Copy link

@danielgtaylor thanks for the update!

@danielgtaylor
Copy link
Owner

@ye, @artlogic version 2.2.0 is now released which supports Node.js 3.x and 4.x. Please note, it works with the new Protagonist, which itself is based on the new Drafter that does not yet generate JSON Schema from MSON and may contain some other MSON-related bugs. We are hard at work fixing them in upcoming backward-compatible releases!

@artlogic
Copy link

@danielgtaylor thanks for all your hard work on this!

@mrmurphy
Copy link

I agree, thanks!

@artlogic
Copy link

@danielgtaylor one more thing - where would I be able to find information about the timeline for supporting MSON in protagonist? Is there a list of blocking issues?

@ye
Copy link
Author

ye commented Oct 27, 2015

@danielgtaylor thank you! All works now.

$ aglio -v
aglio 2.2.0
olio 1.2.1
$ node -v
v4.2.1
$ npm -v
3.3.9
$ aglio -i v1.apib -o v1.html 
>> Line 15: action with method 'PUT' already defined for resource '/user/{id}' (warning code 2)
>> Line 27: action with method 'PUT' already defined for resource '/user/{id}' (warning code 2)
>> Line 56: action with method 'PUT' already defined for resource '/user/{id}' (warning code 2)
$

@kylef
Copy link
Collaborator

kylef commented Oct 27, 2015

@danielgtaylor one more thing - where would I be able to find information about the timeline for supporting MSON in protagonist? Is there a list of blocking issues

@artlogic Protagonist is a wrapper around the Drafter C++ library so you can look into there for a list of known issues.

We have a 2.0.0 milestone which shows all of the known issues we are working though. After that our intention is to work on JSON Schema support inside Drafter.

As for a timeline, we unfortunately don't have any dates we can share at the moment. But these are the things we are working on.

@artlogic
Copy link

@kylef thanks for taking the time to give a status update. I appreciate it.

@ye
Copy link
Author

ye commented Oct 30, 2015

Looks like node has just been updated to 5.0.0 yesterday. And yes, aglio is broken on the new version again. Sigh...

https://github.com/nodejs/node/blob/v5.0.0/CHANGELOG.md

@danielgtaylor
Copy link
Owner

@ye I've been using Node.js 5.0.0 since yesterday with Aglio and it is working fine for me. I just had to reinstall Aglio because of the compiled dependencies (same issue everytime you switch major versions). What specifically is the problem you are seeing?

@ye
Copy link
Author

ye commented Nov 3, 2015

@danielgtaylor you are absolutely correct that unistall / reinstall worked! Thank you!

@coderdave
Copy link

Using Node.js 5.0.0, uninstall/reinstall did not work for me. Still getting:
module.js:450
return process.dlopen(module, path._makeLong(filename));

@danielgtaylor
Copy link
Owner

@coderdave make sure you are uninstalling/installing in the right location (e.g. with -g for a global install) and make sure that npm and node are from the same install (e.g. mine are both in /usr/local/bin/...). After that, let me know if it's still an issue. Worst case you should be able to do a local install (without -g) and run with ./node_modules/.bin/aglio to confirm it can work.

@coderdave
Copy link

Reinstalling it globally seemed to work. Thanks.

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

No branches or pull requests

6 participants