danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

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

Closed ye closed 9 years ago

ye commented 9 years ago

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 commented 9 years ago

@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 commented 9 years ago

@danielgtaylor thanks for the update!

artlogic commented 9 years ago

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

danielgtaylor commented 9 years ago

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

artlogic commented 9 years ago

@danielgtaylor thanks for the update!

danielgtaylor commented 9 years ago

@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 commented 9 years ago

@danielgtaylor thanks for all your hard work on this!

mrmurphy commented 9 years ago

I agree, thanks!

artlogic commented 9 years ago

@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 commented 9 years ago

@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 commented 9 years ago

@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 commented 9 years ago

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

ye commented 9 years ago

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 commented 9 years ago

@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 commented 9 years ago

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

coderdave commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

Reinstalling it globally seemed to work. Thanks.