yeoman/grunt-usemin

throw a error when grunt run task

blueforest opened this issue · 0 comments

Gruntfile.js:

    useminPrepare: {
      html: '<%= publicPath %>/index.html',
      options: {
        dest: '<%= publicDistPath %>',
        flow: {
          html: {
            steps: {
              js: ['concat', 'uglifyjs'],
              css: ['cssmin']
            }
          }
        }
      }
    },

    // Performs rewrites based on filerev and the useminPrepare configuration
    usemin: {
      html: ['<%= publicDistPath %>/{,*/}*.html'],
      css: ['<%= publicDistPath %>/styles/{,*/}*.css'],
      options: {
        assetsDirs: ['<%= publicDistPath %>', '<%= publicDistPath %>/images']
      }
    },

when I run grunt:

Running "useminPrepare:html" (useminPrepare) task
Warning: An error occurred while processing a template (Cannot read property 'name' of undefined). Use --force to continue.