Error: Cannot find module 'zlib'. connect@1.9.2 doesn't work with node 0.4.12 as proclaimed in doc. #689

jigargosar opened this Issue Nov 8, 2012 · 3 comments


None yet

2 participants

jigar@ubuntu:~/node_libs/ls/node_modules/express$ npm ls
express@2.3.10 /home/jigar/node_libs/ls/node_modules/express
├─┬ connect@1.9.2 
│ └── formidable@1.0.11 
├── mime@1.2.6 
└── qs@0.5.0 
jigar@ubuntu:~/node_libs/ls/node_modules/express$ node 
> require("connect");
Error: Cannot find module 'zlib'
    at Function._resolveFilename (module.js:326:11)
    at Function._load (module.js:271:25)
    at require (module.js:355:19)
    at Object.<anonymous> (/home/jigar/node_libs/ls/node_modules/express/node_modules/connect/lib/middleware/compress.js:14:12)
    at Module._compile (module.js:411:26)
    at Object..js (module.js:417:10)
    at Module.load (module.js:343:31)
    at Function._load (module.js:302:12)
    at require (module.js:355:19)
    at Object.compress (/home/jigar/node_libs/ls/node_modules/express/node_modules/connect/lib/connect.js:89:14)
jigar@ubuntu:~/node_libs/ls/node_modules/express$ node -v

tj commented Nov 8, 2012

0.4.x is super old, any specific reason not to upgrade?

  • Fine, if that's the response, I can't do much, currently I am stuck with node 0.4.x.
  • Since migration is a big effort, lots of testing will be required before putting 0.8.x in prod. Not to mention all old version of the libraries that I am using, which will have to be upgraded too. Donno which ones will stop working, or give random errors on prod.
  • Also, things are working smoothly, in 0.4.x, there is no reason to upgrade now. Probably when 1.x.x is released.
tj commented Nov 9, 2012

you can use the "zlib" in npm for compress() to support older versions

@tj tj closed this Nov 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment