Closed cwoloszynski closed 9 years ago
I did some investigating and it seems that the error is coming from the 'vendor' task. The error occurs within the es.merge() call below. I am guessing that it is in the dist() function but I am very new to gulp. I don't know if this helps anyone to see the issue.
gulp.task('vendors', function() { var bowerStream = g.bowerFiles();
return es.merge( bowerStream.pipe(g.filter('*/.css')).pipe(dist('css', 'vendors')), bowerStream.pipe(g.filter('*/.js')).pipe(dist('js', 'vendors')) );
});
I did some looking at the dist() function. It sets the dest twice, so I removed the second setting and it no longer crashes. Not sure it does what it is supposed to do, but it no longer fails.
/**
@param {Object} opt */ function dist(ext, name, opt) { opt = opt || {};
return lazypipe() .pipe(g.concat, name + '.' + ext) .pipe(gulp.dest, './dist') .pipe(opt.ngAnnotate ? g.ngAnnotate : noop) .pipe(opt.ngAnnotate ? g.rename : noop, name + '.annotated.' + ext) .pipe(opt.ngAnnotate ? gulp.dest : noop, './dist') .pipe(ext === 'js' ? g.uglify : g.minifyCss) .pipe(g.rename, name + '.min.' + ext)() //.pipe(gulp.dest, './dist')() ; }
Duplicate with #73 closing this one.
I am trying to put together a production plan to use this approach. I need a production server as well as an HTTPS proxy for the backend. Seems like nginx would be a good fit to handle this.
However, when I try to generate a static site to feed to nginx, using 'cd frontend; gulp dist' I get an error.
[18:38:26] Starting 'scripts-dist'...
stream.js:94 throw er; // Unhandled stream error in pipe. ^ Broken @import declaration of "http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" - timeout
Am I doing something wrong or is this not working as designed?