i trying build app using grunt build , got error:
# grunt build running "clean:dist" (clean) task running "wiredep:app" (wiredep) task running "wiredep:sass" (wiredep) task running "includesource:dist" (includesource) task file "dist/index.html" created. running "useminprepare:html" (useminprepare) task configuration changed concat, uglify, cssmin running "concurrent:dist" (concurrent) task >> warning: there more tasks concurrency limit. after limit >> reached no further tasks run until current tasks >> completed. can adjust limit in concurrent task options warning: running "imagemin:dist" (imagemin) task warning: error: command failed: /var/www/html/mt060915-00-sara/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng -strip -quiet -clobber -o 3 -out /tmp/779c540d-814c-4996-a3c1-9ac2dd258ce6 /tmp/bbb66aa4-f646-41dd-8dd1-92f7440c5166 /var/www/html/mt060915-00-sara/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng: /lib64/libc.so.6: version `glibc_2.14' not found (required /var/www/html/mt060915-00-sara/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng) in file app/images/ico-class.png use --force continue. aborted due warnings. execution time (2015-07-17 03:52:26 utc) loading tasks 7ms ▇▇▇▇▇▇ 11% imagemin:dist 54ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 87% total 62ms use --force continue. aborted due warnings. execution time (2015-07-17 03:52:24 utc) wiredep:app 165ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7% includesource:dist 27ms ▇▇▇ 1% concurrent:dist 2s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 89% total 2.2s this package.json file content:
{ "name": "webapp", "version": "0.0.0", "private": true, "dependencies": { "angular-momentjs": "~0.1.8" }, "devdependencies": { "grunt": "^0.4.1", "grunt-autoprefixer": "^0.7.3", "grunt-concurrent": "^0.5.0", "grunt-contrib-clean": "^0.5.0", "grunt-contrib-compass": "^1.0.1", "grunt-contrib-concat": "^0.4.0", "grunt-contrib-connect": "^0.7.1", "grunt-contrib-copy": "^0.5.0", "grunt-contrib-cssmin": "^0.9.0", "grunt-contrib-htmlmin": "^0.3.0", "grunt-contrib-imagemin": "^0.8.1", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.4.0", "grunt-contrib-watch": "^0.6.1", "grunt-filerev": "^0.2.1", "grunt-google-cdn": "^0.4.0", "grunt-include-source": "~0.4.1", "grunt-karma": "^0.8.3", "grunt-newer": "^0.7.0", "grunt-ngmin": "^0.0.3", "grunt-svgmin": "^0.4.0", "grunt-usemin": "^2.1.1", "grunt-wiredep": "1.8.0", "jshint-stylish": "^0.2.0", "karma": "^0.12.17", "karma-jasmine": "^0.1.5", "karma-phantomjs-launcher": "^0.1.4", "load-grunt-tasks": "^0.4.0", "time-grunt": "^0.3.1", "try-thread-sleep": "^1.0.0" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "grunt test" } } and gruntfile.js:
// generated on 2014-07-15 using generator-angular 0.9.5 'use strict'; // # globbing // performance reasons we're matching 1 level down: // 'test/spec/{,*/}*.js' // use if want recursively match subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // load grunt tasks automatically require('load-grunt-tasks')(grunt); // time how long tasks take. can when optimizing build times require('time-grunt')(grunt); // configurable paths application var appconfig = { app: require('./bower.json').apppath || 'app', dist: 'dist' }; grunt.loadnpmtasks('grunt-include-source'); // define configuration tasks grunt.initconfig({ // project settings yeoman: appconfig, // includes project files index.html includesource: { options: { basepath: 'app', baseurl: '/' }, server: { files: { '.tmp/index.html': '<%= yeoman.app %>/index.html' } }, dist: { files: { '<%= yeoman.dist %>/index.html': '<%= yeoman.app %>/index.html' } } }, // watches files changes , runs tasks based on changed files watch: { bower: { files: ['bower.json'], tasks: ['wiredep'] }, includesource: { files: ['<%= yeoman.app %>/index.html'], tasks: ['includesource:server'] }, js: { files: ['<%= yeoman.app %>/scripts/{,*/}*.js'], tasks: ['newer:jshint:all'], options: { livereload: '<%= connect.options.livereload %>' } }, jstest: { files: ['test/spec/{,*/}*.js'], tasks: ['newer:jshint:test', 'karma'] }, compass: { files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'], tasks: ['compass:server', 'autoprefixer'] }, gruntfile: { files: ['gruntfile.js'] }, livereload: { options: { livereload: '<%= connect.options.livereload %>' }, files: [ '<%= yeoman.app %>/{,*/}*.html', '<%= yeoman.app %>/views/{,*/}*.html', '.tmp/styles/{,*/}*.css', '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ] } }, // actual grunt server settings connect: { options: { port: 9000, // change '0.0.0.0' access server outside. hostname: '0.0.0.0', livereload: 35729 }, livereload: { options: { open: true, middleware: function (connect) { return [ connect.static('.tmp'), connect().use( '/bower_components', connect.static('./bower_components') ), connect.static(appconfig.app) ]; } } }, test: { options: { port: 9001, middleware: function (connect) { return [ connect.static('.tmp'), connect.static('test'), connect().use( '/bower_components', connect.static('./bower_components') ), connect.static(appconfig.app) ]; } } }, dist: { options: { open: true, base: '<%= yeoman.dist %>' } } }, // make sure code styles par , there no obvious mistakes jshint: { options: { jshintrc: '.jshintrc', reporter: require('jshint-stylish') }, all: { src: [ 'gruntfile.js', '<%= yeoman.app %>/scripts/{,*/}*.js' ] }, test: { options: { jshintrc: 'test/.jshintrc' }, src: ['test/spec/{,*/}*.js'] } }, // empties folders start fresh clean: { dist: { files: [{ dot: true, src: [ '.tmp', '<%= yeoman.dist %>/{,*/}*.*', '!<%= yeoman.dist %>/.git*', '!<%= yeoman.dist %>/.svn*', '!<%= yeoman.dist %>/{,*/}.svn*' ] }] }, server: '.tmp' }, // add vendor prefixed styles autoprefixer: { options: { browsers: ['last 1 version'] }, dist: { files: [{ expand: true, cwd: '.tmp/styles/', src: '{,*/}*.css', dest: '.tmp/styles/' }] } }, // automatically inject bower components app wiredep: { options: { cwd: '<%= yeoman.app %>' }, app: { src: ['<%= yeoman.app %>/index.html'], ignorepath: /\.\.\// }, sass: { src: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'], ignorepath: /(\.\.\/){1,2}bower_components\// } }, // compiles sass css , generates necessary files if requested compass: { options: { sassdir: '<%= yeoman.app %>/styles', cssdir: '.tmp/styles', generatedimagesdir: '.tmp/images/generated', imagesdir: '<%= yeoman.app %>/images', javascriptsdir: '<%= yeoman.app %>/scripts', fontsdir: '<%= yeoman.app %>/styles/fonts', importpath: './bower_components', httpimagespath: '/images', httpgeneratedimagespath: '/images/generated', httpfontspath: '/styles/fonts', relativeassets: false, assetcachebuster: false, raw: 'sass::script::number.precision = 10\n' }, dist: { options: { generatedimagesdir: '<%= yeoman.dist %>/images/generated' } }, server: { options: { debuginfo: true } } }, // renames files browser caching purposes filerev: { dist: { src: [ '<%= yeoman.dist %>/scripts/{,*/}*.js', '<%= yeoman.dist %>/styles/{,*/}*.css' //'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' // '<%= yeoman.dist %>/styles/fonts/**/*.{eot,svg,ttf,woff}' ] } }, // reads html usemin blocks enable smart builds automatically // concat, minify , revision files. creates configurations in memory // additional tasks can oper // ate on them useminprepare: { html: '<%= yeoman.dist %>/index.html', options: { dest: '<%= yeoman.dist %>', flow: { html: { steps: { js: ['concat', 'uglifyjs'], css: ['cssmin'] }, post: {} } } } }, // performs rewrites based on filerev , useminprepare configuration usemin: { html: ['<%= yeoman.dist %>/{,*/}*.html'], css: ['<%= yeoman.dist %>/styles/{,*/}*.css'], options: { assetsdirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images'] } }, // following *-min tasks produce minified files in dist folder // default, `index.html`'s <!-- usemin block --> take care of // minification. these next options pre-configured if not wish imagemin: { dist: { files: [{ expand: true, cwd: '<%= yeoman.app %>/images', src: '{,*/}*.{png,jpg,jpeg,gif}', dest: '<%= yeoman.dist %>/images' }] } }, svgmin: { dist: { files: [{ expand: true, cwd: '<%= yeoman.app %>/images', src: '{,*/}*.svg', dest: '<%= yeoman.dist %>/images' }] } }, htmlmin: { dist: { options: { collapsewhitespace: true, conservativecollapse: true, collapsebooleanattributes: true, removecommentsfromcdata: true, removeoptionaltags: true }, files: [{ expand: true, cwd: '<%= yeoman.dist %>', src: ['*.html', 'views/{,**/}*.html'], dest: '<%= yeoman.dist %>' }] } }, // ngmin tries make code safe minification automatically // using angular long form dependency injection. doesn't work on // things resolve or inject have done manually. ngmin: { dist: { files: [{ expand: true, cwd: '.tmp/concat/scripts', src: '*.js', dest: '.tmp/concat/scripts' }] } }, // replace google cdn references cdnify: { dist: { html: ['<%= yeoman.dist %>/*.html'] } }, // copies remaining files places other tasks can use copy: { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ '*.{ico,png,txt}', '.htaccess', '*.html', 'views/{,**/}*.html', 'images/{,*/}*.{webp}', 'styles/fonts/**/*', 'fonts/*', 'sounds/*' ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/images', src: ['generated/*'] }, { expand: true, cwd: '.', src: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/*', dest: '<%= yeoman.dist %>' }] }, styles: { expand: true, cwd: '<%= yeoman.app %>/styles', dest: '.tmp/styles/', src: '{,*/}*.css' } }, // run tasks in parallel speed build process concurrent: { server: [ 'compass:server' ], test: [ 'compass' ], dist: [ 'compass:dist', 'imagemin', 'svgmin' ] }, // test settings karma: { unit: { configfile: 'test/karma.conf.js', singlerun: true } } }); grunt.registertask('serve', 'compile start connect web server', function (target) { if (target === 'dist') { return grunt.task.run(['build', 'connect:dist:keepalive']); } grunt.task.run([ 'clean:server', 'wiredep', 'includesource', 'concurrent:server', 'autoprefixer', 'connect:livereload', 'watch' ]); }); grunt.registertask('server', 'deprecated task. use "serve" task instead', function (target) { grunt.log.warn('the `server` task has been deprecated. use `grunt serve` start server.'); grunt.task.run(['serve:' + target]); }); grunt.registertask('test', [ 'clean:server', 'concurrent:test', 'autoprefixer', 'connect:test', 'karma' ]); grunt.registertask('build', [ 'clean:dist', 'wiredep', 'includesource:dist', 'useminprepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', 'cdnify', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin' ]); grunt.registertask('default', [ 'newer:jshint', 'test', 'build' ]); }; i've seen this issue , tried in there doesn't work me. wrong? driving me crazy , don't know why or fails, advice?
try this:
npm install grunt-contrib-imagemin --save-dev or change version of imagemin "grunt-contrib-imagemin": "^0.9.4"
Comments
Post a Comment