Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect version 1.9.1: zlib used but not included in package.json #613

Closed
qfan opened this issue Jun 27, 2012 · 11 comments
Closed

Connect version 1.9.1: zlib used but not included in package.json #613

qfan opened this issue Jun 27, 2012 · 11 comments

Comments

@qfan
Copy link

qfan commented Jun 27, 2012

in ./lib/middleware/compress.js: var zlib = require('zlib');

but there is no corresponding dependency in package.json

This breaks automatic server setup. Please fix by either adding zlib dependency in package.json or remove the require('zlib'); from the code. Thanks.

@papandreou
Copy link
Contributor

That would be https://github.com/joyent/node/blob/master/lib/zlib.js, which is built into node. It landed in node 0.5.8. If you're using a previous version of node, the compress middleware isn't supported in its current incarnation.

@qfan qfan closed this as completed Jun 28, 2012
@qfan
Copy link
Author

qfan commented Jun 28, 2012

Thanks. We are using a much older version and currently we don't have the capacity to fully test our application with newer node.js.

The temporary solution we have is to run 'npm install zlib' explicitly before installing any other packages in package.json.
It works for now.

@druciak
Copy link

druciak commented Jul 2, 2012

I agree with fanqi1234: for 0.4.x it should either detect whether 'zlib' is available and just not use compression if not or 'compress' middleware should be completely removed from 1.x branch. Please reopen.

@strk
Copy link

strk commented Jul 3, 2012

+1 on reopening I just got the zlib error while installing "express" with node-0.4.10

Would encoding the dependency on "zlib" install a duplicate when using a version of "node" with zlib built in ?

@tj
Copy link
Member

tj commented Jul 3, 2012

@strk yeah it would be best as an optional-dependency since some people wont use it at all, and mostly because you have to compile which sucks

@tj
Copy link
Member

tj commented Jul 3, 2012

actually it just shouldn't have been backported at all, it could have been a third-party backport with zlib as the dep

@strk
Copy link

strk commented Jul 3, 2012

On Tue, Jul 03, 2012 at 01:48:10PM -0700, TJ Holowaychuk wrote:

@strk yeah it would be best as an optional-dependency since some people wont use it at all, and mostly because you have to compile which sucks

I actually love compiling :)

--strk;

@tj
Copy link
Member

tj commented Jul 3, 2012

well it's not a nice thing to force on people just for a backport :p

@TooTallNate
Copy link
Contributor

cp.spawn('gzip') :p

@tj
Copy link
Member

tj commented Jul 3, 2012

supes slow

@TooTallNate
Copy link
Contributor

'twas partially a joke (I mean, people looking for good performance should upgrade to the latest node anyways)

strk pushed a commit to strk/Windshaft that referenced this issue Jul 15, 2014
This is a workaround to "express" requiring a version of "connect"
which doesn't do so.
See senchalabs/connect#613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants