deanmao / node-chimera

A new kind of headless webkit integration for nodejs; a great alternative to phantomjs.
http://www.deanmao.com/2012/08/13/enter-chimera/
MIT License
847 stars 45 forks source link

Won't install with node v0.11.10 #46

Open ghost opened 10 years ago

ghost commented 10 years ago

When trying to install chimera using node v0.11.10, I get this error:

npm http GET https://registry.npmjs.org/chimera
npm http 304 https://registry.npmjs.org/chimera
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/request

> chimera@0.3.2 postinstall /home/isaac/fez-qunit/node_modules/chimera
> node scripts/download_native_binary.js

downloading chimera native binary for: linux_x64

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error: incorrect header check
    at Zlib._binding.onerror (zlib.js:323:17)
npm ERR! chimera@0.3.2 postinstall: `node scripts/download_native_binary.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the chimera@0.3.2 postinstall script.
npm ERR! This is most likely a problem with the chimera package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/download_native_binary.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls chimera
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.12.6-1-ARCH
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "chimera"
npm ERR! cwd /home/isaac/fez-qunit
npm ERR! node -v v0.11.10
npm ERR! npm -v 1.3.22
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/isaac/fez-qunit/npm-debug.log
npm ERR! not ok code 0
uiuxdeveloper commented 10 years ago

also having the same issue.

deanmao commented 10 years ago

Install from source -- I should remove chimera from the npm repo because installing it via npm is like installing a binary where node's ABI has changed.

smokku commented 10 years ago

Not supporting installing via npm does not scale. I cannot tell every developer in my team to install chimera from source - thus I cannot use chimera in my project.

deanmao commented 10 years ago

That's fine... unfortunately that's the case right now. Blame Qt if you like, but they do not allow webkit static compiles due to licensing issues, so it's a "legal" reason as to why it won't work. You can read the comment in their makefile.

ghost commented 10 years ago

Could you not download and compile webkit at package install time?

deanmao commented 10 years ago

hah no. reason is that webkit (inside of Qt) is a 150MB download, and usually takes about 2 hours to compile on a quad core machine. Plus there are a few manual things that you have to do which cannot be done inside a simple makefile. Webkit is really a beast. If you remove it from Qt, it would make the normal Qt package 100MB smaller.

I'm considering of trying a different browser inside of chimera instead of Qt's Webkit, but some features may not be the same afterwards...

smokku commented 10 years ago

PhantomJS manages to provide npm compatible package. Maybe it's worth looking on how they do it?

deanmao commented 10 years ago

So I'm actually using PhantomJS's build system to create the makefile. I think the difference is that phantomjs runs as a separate binary, but I'm building a library the runs inside the nodejs process space. There's some weird differences between the two, for example nodejs uses a slightly different ssl library than the one in Qt, so the compilation is a little screwed up. Maybe someone with some more Qt experience could advise me here?

smokku commented 10 years ago

Is it possible to provide QtWebkit binary as an .so or .a, and during "npm install" build a thin glue layer that links them as chimera.so for specific node.js version?