tarlepp / angular-sailsjs-boilerplate

'Boilerplate' for AngularJS + Sails.js
MIT License
307 stars 87 forks source link

Trying to set up a production site using nginx -- gulp dist failing #79

Closed cwoloszynski closed 9 years ago

cwoloszynski commented 9 years ago

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?

cwoloszynski commented 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')) );

});

cwoloszynski commented 9 years ago

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.

/**

tarlepp commented 9 years ago

Duplicate with #73 closing this one.