Giter VIP home page Giter VIP logo

Comments (17)

devongovett avatar devongovett commented on August 21, 2024

Hmmm. Are you sure you're on the most recent zlib version (installed via npm)? It is working for me and the source code for zlib says "deflate" not "Deflate". Can you try uninstalling and reinstalling the zlib module with npm?

from pdfkit.

olifer avatar olifer commented on August 21, 2024

I've just noticed, that I get some warnings in node-zlib.cc while installing pdfkit


npm uninstall pdfkit
...
npm info uninstall [email protected] complete
npm ok


npm uninstall zlib
..
npm info uninstall [email protected] complete
npm ok

npm install pdfkit
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info range zlib@>=1.0.2
npm info preinstall [email protected]
npm info preinstall [email protected]
Nothing to clean (project not configured)
Setting srcdir to                        : /usr/local/lib/node/.npm/zlib/1.0.5/package 
Setting blddir to                        : /usr/local/lib/node/.npm/zlib/1.0.5/package/build 
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
Checking for library z                   : yes 
'configure' finished successfully (0.869s)
Waf: Entering directory `/usr/local/lib/node/.npm/zlib/1.0.5/package/build'
[1/2] cxx: src/node-zlib.cc -> build/Release/src/node-zlib_1.o
../src/node-zlib.cc: In function ‘v8::Handle ZLib_deflate(const v8::Arguments&)’:
../src/node-zlib.cc:82: warning: left-hand operand of comma has no effect
../src/node-zlib.cc: In function ‘v8::Handle ZLib_inflate(const v8::Arguments&)’:
../src/node-zlib.cc:83: warning: left-hand operand of comma has no effect
[2/2] cxx_link: build/Release/src/node-zlib_1.o -> build/Release/zlib_bindings.node
Waf: Leaving directory `/usr/local/lib/node/.npm/zlib/1.0.5/package/build'
'build' finished successfully (0.784s)
npm info install [email protected]
npm info postinstall [email protected]
npm info preactivate [email protected]
npm info activate [email protected]
npm info postactivate [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preactivate [email protected]
npm info activate [email protected]
npm info postactivate [email protected]
npm info build Success: [email protected]
npm info build Success: [email protected]
npm ok


from pdfkit.

olifer avatar olifer commented on August 21, 2024

Well, the problem was caused by node version v0.5.8, where zlib is included in API.

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

Oh, interesting. I hadn't noticed that. Man that really sucks that they use a different API. Not really sure what I should do here...

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

I've put the question to the node authors. I'll get back to you on this one. For now, it seems v0.5.x is broken. If you can, use v0.4.x for now. Thanks!

from pdfkit.

olifer avatar olifer commented on August 21, 2024

Okay, it won't be problem to use your library in projects on heroku, which requires Node.js 0.4.7. For other projects I'll wait for v0.5.x compatible version. Thanks for assistance!

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

This should be fixed. Please update to pdfkit version 0.1.6 with npm and let me know if you have any more issues. Thanks!

from pdfkit.

robrbecker avatar robrbecker commented on August 21, 2024

I have an issue installing pdfkit on windows w/ Node 0.6.1. Looking at the flate package tells me the problem. It's doing a native compile looks like. Any reason you are not just using the zlip that is now built into Node .6+ ? Does it need to be synchronous?

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

Yeah for backward compatibility with Node 0.4.x... Hmmm, well that sucks. Not sure what to do now.

from pdfkit.

robrbecker avatar robrbecker commented on August 21, 2024

Aw right, that makes sense. Ugh need a branch for .4 then?

from pdfkit.

NeCkEr avatar NeCkEr commented on August 21, 2024

im getting this error with v0.6.2 of node... any help?

from pdfkit.

ixti avatar ixti commented on August 21, 2024

Got an error on node 0.6.5:

Error: Cannot find module './zlib_bindings'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/home/ixti/projects/ndoc2pdf/node_modules/pdfkit/node_modules/flate/lib/zlib.js:1:80)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)

from pdfkit.

rix501 avatar rix501 commented on August 21, 2024

Also getting this error on node 0.6.8

    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/Users/rix501/Documents/Websites/node/housing/node_modules/pdfkit/node_modules/flate/lib/zlib.js:1:80)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

This issue has been merged into #48. Please resume discussion there. :)

from pdfkit.

niftylettuce avatar niftylettuce commented on August 21, 2024

This isn't fixed dude, zlib is now part of node core, why are you using flate still? Is this no longer maintained?

from pdfkit.

devongovett avatar devongovett commented on August 21, 2024

As I said before, the discussion of this issue is now taking place at #48. I know it isn't working. The switch to the built in zlib module will require a major rewrite.

from pdfkit.

alFReD-NSH avatar alFReD-NSH commented on August 21, 2024

I actually did that: alFReD-NSH@d994c7b

Changed some of the API to async. But not everything is working(fonts or images) and I haven't documented the API change.

from pdfkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.