sindresorhus / gulp-zip

ZIP compress files
MIT License
270 stars 47 forks source link

Error with zip #47

Closed kidesigner closed 9 years ago

kidesigner commented 9 years ago

I have error with your example code:

node_modules/gulp-zip/node_modules/yazl/index.js:65 entry.uncompressedSize = buffer.length; ^ TypeError: Cannot read property 'length' of null

kevva commented 9 years ago

Pretty sure this is related to https://github.com/sindresorhus/gulp-zip/pull/46.

kidesigner commented 9 years ago

Please help me.

kevva commented 9 years ago

Are you trying to compress any empty folders?

kidesigner commented 9 years ago

My project:

css
js
node_modules
gulpfile.js
index.php

and here is gulpfile content:

gulp.task('zip', function () {
    return gulp.src('css/*')
        .pipe(zip('archive.zip'))
        .pipe(gulp.dest('dist'));
});
kevva commented 9 years ago

Can you try installing this module directly from github (npm install https://github.com/sindresorhus/gulp-zip/archive/master.tar.gz) and try again?

kidesigner commented 9 years ago

Solve! It's working! thank you with your rocket support!

kevva commented 9 years ago

Sweet! :) @sindresorhus, can we get a new release on this?

jamesmorgan commented 9 years ago

:+1: this would be good to get a fix out for :smile: