Skip to content

grunt build errors. #8

@andrew-luhring

Description

@andrew-luhring

I had a few errors while running grunt build so I figured I'd share my solutions in case anyone else has the same issues.

uglification:

fatal error:

WARN: Dropping unused function argument data [.tmp/concat/scripts/vendor.js:14043,47]
WARN: Dropping unused variable i [.tmp/concat/scripts/vendor.js:15396,30]
WARN: Dropping unused function argument value [.tmp/concat/scripts/vendor.js:15315,45]
WARN: Dropping side-effect-free statement [null:1,0]
[TypeError: Cannot read property 'argnames' of undefined]
[TypeError: Cannot read property 'argnames' of undefined]
>> Uglifying source ".tmp/concat/scripts/vendor.js,.tmp/concat/scripts/scripts.js" failed.
Warning: Uglification failed.
Cannot read property 'argnames' of undefined.
 Use --force to continue.

solution:

uglify: {
      dist:{
        options : {
          sourceMap: '<%= yeoman.dist %>/scripts/scripts.map.js',
          sourceMapRoot: '/',
          mangle: false,
          report: 'min',
          beautify: {
              // same options
          },
          compress: {
             // same options except comment this out:
//            unsafe        : true,            // some unsafe optimizations (see docs)

concurrency

(non-fatal) error:

>> Warning: There are more tasks than your concurrency limit. After this limit
>> is reached no further tasks will be run until the current tasks are
>> completed. You can adjust the limit in the concurrent task options

solution:

 concurrent: {
      server: [
        'copy:styles'
      ],
      test: [
        'copy:styles',
      ],
      dist: [
        'copy:styles',
        'imagemin',
        'svgmin'
      ]
       ,                     // <---- add this 
      options: {        // <---- add this 
        limit: 5          // <---- add this 
      }                     // <---- add this 
    }

source

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions