Gulp build fails with: Error: Broken @import declaration of “http://fonts.googleapis.com/css?family=Open+Sans”

I am currently working on a project that involves an Angular.js frontend and the build server running on a machine behind a corporate proxy. From time to time this error occurs:

Error: Broken @import declaration of “http://fonts.googleapis.com/css?family=Open+Sans

All the other tasks such as bower install work fine because we set the proxy for bower, npm and git. After some research it became clear that the clean-css dependency that is used by gulp-minify-css  is the problem. This plugin ignores the proxy settings and tries to resolve the import declaration directly. Solution is very easy: just set a HTTP_PROXY environment variable with your proxy and everything works just fine.

This issue here describes some more possibilities to get around this problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s