Cannot find module './zlib_bindings'
See original GitHub issuenode 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)
Issue Analytics
- State:
- Created 12 years ago
- Comments:26 (6 by maintainers)
Top Results From Across the Web
Uncaught Error: Cannot find module 'zlib' - Stack Overflow
have you add the zib module, in the package.json using npm install zlib , after that when you do npm install, i guess...
Read more >Issues - GitHub
hi guys I have an error with my app it says Error: Cannot find module './zlib_bindings' my webpack config.
Read more >help - Meteor forums
I have an NPM dependency on 'zlib': '1.0.5'. When I add this dependency I get this ... Uncaught Error: Cannot find module './zlib_bindings'....
Read more >zlib - npm
BUILDING. Make sure you have zlib installed. Mac OS X ships with it by default. To obtain and build the bindings:
Read more >Module not found: Can't resolve 'zlib' error [Solved] | bobbyhadz
The error "Module not found: Can't resolve 'zlib'" most commonly occurs when you import a Node.js specific function in your frontend (e.g. React.js) ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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
I got the error and mentioned how to reproduce here, Kindly have a look. https://stackoverflow.com/questions/69805191/what-is-the-proper-way-to-use-pdfkit-in-react-native