gzippo is not working with newest connect/express #43

Almad opened this Issue Jul 9, 2012 · 11 comments


None yet

10 participants

Almad commented Jul 9, 2012

staticSend has been extracted to separate library

@Almad Almad added a commit to apiaryio/gzippo that referenced this issue Jul 9, 2012
@Almad Almad Add support for standalone send library (fixes #43) d8ddb6f
@Almad Almad added a commit to apiaryio/gzippo that referenced this issue Jul 9, 2012
@Almad Almad Add compatibility layer for new connect/send (fixes #43) 5c6816d
Almad commented Jul 9, 2012

(sorry for the first bad fix)

@Almad Almad added a commit to apiaryio/gzippo that referenced this issue Jul 10, 2012
@Almad Almad Rely on require(send) for detection (refs #43) f637d06
uipoet commented Jul 13, 2012

+1. Updated to express 3.0.0beta6 and no worky.

@ethul ethul added a commit to ethul/oregano that referenced this issue Jul 14, 2012
@ethul ethul Using specific express version
Because of issue tomgco/gzippo#43, using a specific express version to
side-step the problem until it is resolved.

npm install connect@2.3.4 on the culprit project seems to fix this for me (I'm on the latest Express@3.0RC1 with Gzippo working as expected).


Line 17 to 21

try {
    staticSend = require('connect').static.send; //returns undefined, doesn't throw an error
} catch (e) {
    staticSend = require('express').static.send;

require('connect').static.send; //returns undefined, so test for undefined
//or reorder so that staticSend = require('express').static.send; is tried before require('connect').static.send;

serby commented Sep 14, 2012

+1 When will this be fixed?

aozora commented Sep 29, 2012

+1 needed!


my proposed solution is the following: rigoleto@555be0c

using connect as a dependency instead of the connect/express shenanigans, i rework the pass() function to simply pass non-eligible requests to the connect 2.5.x static middleware


Using Express3.0.0rc4, getting this error. I think it's the same others are experiencing, if not, I'll move to another issue:

staticSend(req, res, next, o);
TypeError: undefined is not a function
at pass (/Users/Projects/tq/server/node_modules/gzippo/lib/staticGzip.js:108:4)
at module.exports (/Users/Projects/tq/server/node_modules/gzippo/lib/staticGzip.js:185:12)
at Object.oncomplete (fs.js:297:15)

tomgco commented Oct 3, 2012


First I would like to apologise my own lack on involvement in the project recently, I shouldn't of let the state of the module have no major development and I should of responded to these issues much sooner. The good news is that I am going to make a big push on getting as many fixes pushed out asap and possibly finish the major refactor I have been working on.

Onto the issue:

I have just install the latest version of express on my machine: express@3.0.0rc4 which is utilising connect@2.4.4 and I am seeing the same issue, I am currently working on a fix at this moment and will update this issue as soon as I have made the merge and the deployment.

Again I would like to apologise for my lack of response.



I too have the same issue.

tomgco commented Oct 17, 2012

0.2 has been released, hopefully this fixes the incompatibility. Let me know if any problems occur. I will keep this open just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment