Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: This socket is closed , when I test grunt-contrib-imagemin

I am testing the plugin grunt-contrib-imagemin for jpg minify. But it always failed as Running "imagemin:dynamic" (imagemin) task Fatal error: This socket is closed.

Source :
 grunt.initConfig({
        imagemin: { // Task
           dynamic: {                         // Another target
        files: [{
        expand: true,                  // Enable dynamic expansion
        cwd: 'src/',                   // Src matches are relative to this path
        src: ['**/*.{png,jpg,gif}'],   // Actual patterns to match
        dest: 'dist/'                  // Destination path prefix
      }]
    }
        }
    });
like image 248
Leslie Avatar asked Nov 01 '22 15:11

Leslie


1 Answers

Try re-installing grunt-contrib-imagemin:

npm cache clean
npm install grunt-contrib-imagemin --save-dev
like image 54
Eric D. Avatar answered Nov 16 '22 11:11

Eric D.