Grunt build - Running “concurrent:dist” (concurrent) task Killed

后端 未结 6 1579
北荒
北荒 2021-02-13 19:11

For some reason, when doing a grunt build on my VM, it simply dies off in this way:

...
Running \"concurrent:dist\" (concurrent) task
Killed
         


        
6条回答
  •  忘掉有多难
    2021-02-13 19:45

    So, I just ran into this problem as well, and I believe it has to do, with as you suspect, the VM running out of memory (are you using a $5 Digital Ocean box too?). The concurrent process attempts to run compass, copy, imagemin, svgmin and html all at the same time, which probably causes the issue, so in my build, I just comment out the concurrent rule, and inserted the individual processes in below and it seems to complete. A little slower, but thats the cost of being a cheapskate :)

    grunt.registerTask('build', [
        'clean:dist',
        'useminPrepare',
        //'concurrent:dist',
        'compass',
        'copy:styles',
        'imagemin',
        'svgmin',
        'htmlmin',
        'autoprefixer',
        'concat',
        'cssmin',
        'uglify',
        'modernizr',
        'copy:dist',
        'rev',
        'usemin'
    ]);
    

提交回复
热议问题