Closed adam-lynch closed 9 years ago
Hmm, it seems like you have files without file.path
.
Hmm don't see how that could be;
gulp.src source
.pipe $.zip generateZipName(...)
.pipe gulp.dest paths.dist.root
.pipe $.size {showFiles: true}
.on 'finish', done
return
I logged the file after the gulp.src
;
{ dev: 16777218,
mode: 16877,
nlink: 3,
uid: 502,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 42474491,
size: 102,
blocks: 0,
atime: Tue Mar 31 2015 17:47:18 GMT+0100 (IST),
mtime: Tue Mar 31 2015 17:47:17 GMT+0100 (IST),
ctime: Tue Mar 31 2015 17:47:17 GMT+0100 (IST) }
The glob passed to gulp.src
is ./dist/TeamworkChat/osx32/**/**
.
That was on OSX (Mavericks) where ./dist/TeamworkChat/osx32
contained a single .app
.
I've gotten the same error on Windows 8. I use the same wrapper function so the call is the same except on Windows the glob is ./dist/TeamworkChat/win32/**/**
and ./dist/TeamworkChat/win32/
contains the following:
Do you mind creating a repo with your stuff so I can test?
@kevva here ya go: https://github.com/adam-lynch/gulp-zip-metadata-error
I am getting the same exact error on Window 8... my gruntfile.js:
var gulp = require('gulp');
var zip = require('gulp-zip');
var paths = {
src: ['images/**', 'lib/**', 'index.html', 'main.js']
};
gulp.task('default', function () {
return gulp.src(paths.src)
.pipe(zip('MyZippedFile.zip'))
.pipe(gulp.dest('../'));
});
I played around a little and found that it will only work if I specify a single file such as 'index.html' but if I used a file glob it will fail with this error.
EDIT: This seems to be broken only in v3.0.0, I ran the same code with v2.0.3 and it works fine.
@adam-lynch, works fine for me using this:
gulp.task('default', function () {
return gulp.src('dist/TeamworkChat/win32/**/*')
.pipe(zip('archive.zip'))
.pipe(gulp.dest('dist'));
});
Because you are using globs that ends with **
some directories doesn't have file.relative
set. Best way to avoid this issue is to use **/*
or just *
.
Thanks
I was trying to confirm that #38 is fixed but I got this:
cc @kevva