Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt build errors. #8

Open
andrew-luhring opened this issue Oct 28, 2014 · 0 comments
Open

grunt build errors. #8

andrew-luhring opened this issue Oct 28, 2014 · 0 comments

Comments

@andrew-luhring
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant