kyleburnett / clipper

Node binding to C++ clipping library
MIT License
9 stars 1 forks source link

Don't work with node 0.12 #3

Open Trufi opened 9 years ago

Trufi commented 9 years ago

Hello. Looks like this module don't work with node 0.12. After npm install, following message appears in console:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/floors-convert/node_modules/clipper
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! clipper@2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the clipper@2.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the clipper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls clipper
npm ERR! There is likely additional logging output above.
kyleburnett commented 9 years ago

I had not tested this before with v0.12. I'll look into this as soon as possible.

Thanks for reporting, Kyle

kyleburnett commented 9 years ago

The issue, it turns out, is that the v8 engine introduced major changes from v0.10 to v0.12 of node.js including the method signature. To fix this, it looks like I need to use the module nan, which will take some time to integrate. This table represents the compatibility of node versions and corresponding clipper versions once 2.1.0 is released:

Node Version Clipper Version
0.10.x >= 1.0.0
0.12.x >= 2.1.0
Trufi commented 9 years ago

Thanks for the explanation.