Comments (10)
Hmm, it seems like you have files without file.path
.
from gulp-zip.
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
from gulp-zip.
Well, the error suggests that. The metadataPath
is pathname
on this and this line. But yeah, it sounds weird.
from gulp-zip.
I logged the file after the gulp.src
;
- file.cwd: /Users/adam/Code/GitHub/teamwork-chat-client
- file.base: /Users/adam/Code/GitHub/teamwork-chat-client/dist/TeamworkChat/osx32/
- file.path: /Users/adam/Code/GitHub/teamwork-chat-client/dist/TeamworkChat/osx32
- file.stat:
{ 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/**/**
.
from gulp-zip.
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:
from gulp-zip.
Do you mind creating a repo with your stuff so I can test?
from gulp-zip.
@kevva here ya go: https://github.com/adam-lynch/gulp-zip-metadata-error
from gulp-zip.
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.
from gulp-zip.
@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 *
.
from gulp-zip.
Thanks
from gulp-zip.
Related Issues (20)
- Replace gulp util
- Changelog HOT 1
- Feature Request: support Yazl's `options.mtime` to enable creating byte-for-byte identical zip archives across rebuilds HOT 2
- readable-stream throws error when using gulp-zip HOT 1
- Can't open zip on Mac OS HOT 7
- Unable to zip Windows "Junction" folders.
- yazl 2.5.0 broke gulp-zip HOT 1
- How to use the options configuration object HOT 1
- gulp-util removal request HOT 1
- gulp-zip change folder permission, from 755 to 666 HOT 6
- Can't install w/ npm HOT 1
- Remove gulp peer dependency? HOT 3
- Files without name are ignored during zip (e.g. ".txt") HOT 2
- yazl TypeError: jsDate.getDate is not a function when setting modfiedTime HOT 1
- How tooutput zip into source directory?
- Request: Add more examples to documentation HOT 3
- Won't zip if folder name contains [square brackets] HOT 2
- FEATURE REQUEST: zip files recursively HOT 1
- Append files to existing zip HOT 1
- Deprecation of Gulp-util HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-zip.