zlib error when using awspublish.gzip()
shantp opened this issue · comments
Using v3.0.1, when trying to use awspublish.gzip() on my files I get this error:
zlib.js:166
callback(null, buf);
^
TypeError: object is not a function
at Gzip.onEnd (zlib.js:166:5)
at Gzip.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickDomainCallback (node.js:463:13)
I installed gulp-awspublish@2.0.2 and the error is gone and my files gzip correctly.
I can also repro this. Works in 2.0.2, but throws the error in 3.0.1.
weird the tests are passing on the latest version
are the tests working for you?
https://github.com/pgherveou/gulp-awspublish#testing
The way gzip is being used in the tests is not the same as the way it is shown in the README. Maybe that is my issue. Is the options object required? Should it be gzip.pipe() as shown in the tests?
nop its not required
this is how I use it to publish our files
const jsOrCss = gulp
.src('./build/*.+(js|css)', { base: './build' })
.pipe(awspublish.gzip())
.pipe(publisher.publish(headers))
OK, that's what my task looks like and I get the zlib error. The only difference is I don't restrict it to js and css.
the zipping might fail on certain files?
On Fri, Oct 16, 2015 at 11:17 AM Shant Parseghian notifications@github.com
wrote:
OK, that's what my task looks like and I get the zlib error. The only
difference is I don't restrict it to js and css.—
Reply to this email directly or view it on GitHub
#86 (comment)
.
I see the error if I'm running in an old version of node.
No problems in 4.0.0, breaks with 0.10.26. I did not test 12.x.
This repo reproduces the error.
This must be my error. I am on a 0.10 version of node.
Confirming that upgrading to a 4.X version of node solves this problem.
cool, maybe we should then add a note in the readme and update the node
version in package.json
On Sun, Oct 25, 2015 at 8:43 AM A.J. Brown notifications@github.com wrote:
Confirming that upgrading to a 4.X version solves this problem.
—
Reply to this email directly or view it on GitHub
#86 (comment)
.