pdfkit: Cannot find module './zlib_bindings'

node v0.6.1 pdfkit v0.1.6

Code:

var pdf = require('pdfkit');

Error log:

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/user/share/test_pdfkit/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)

About this issue

  • Original URL
  • State: closed
  • Created 13 years ago
  • Comments: 26 (6 by maintainers)

Most upvoted comments

@jacksctsai Please help me i did not get your this solution please explain it Goto node_modules/pdfkit/node_modules/flate/ directory. Copy the file zlib_bindings from build/Release directory to lib directory.

I could not find any folders in node_modules. I installed pdfkit from npm and please tell me now what i have to do? where is the flate? and all the other zlib+bindings? I am using react. Please elaborate your solution here