heldr / gulp-smushit

Gulp plugin to optimize PNG and JPG using reSmush.it.
33 stars 2 forks source link

Error 503 when using smushit during move process. #5

Open Jared-Dev opened 7 years ago

Jared-Dev commented 7 years ago
gulp.task('copy-assets:datatables.net:images', function() {
    return gulp.src(nodeSource + "/datatables/media/images/*.png")
        .pipe(smushit())
        .pipe(gulp.dest(assetRoot + "/images/"));
});

When running the above gulp task I'm getting an error (shown below)...

$ gulp copy-assets:datatables.net:images
[10:28:41] Using gulpfile ~\Dev\agrilead\gulpfile.js
[10:28:41] Starting 'copy-assets:datatables.net:images'...
{ '0': <File "sort_asc.png" <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 13 00 00 00 13 08 06 00 00 00 72 50 36 cc 00 00 00 67 49 44 41 54 38 cb 63 60 18 b2 a0 aa e1 ... >>,
  '1': 503 }

events.js:160
      throw er; // Unhandled 'error' event
      ^
Error: 503

The error gets triggered on different files at times. Is there any sort of rate limiting on the back-end service?

gitshot commented 6 years ago

Try updating the Package manager... It should fix the issue... npm i -g npm