Grunt error - Cannot assign to read only property 'warnings' of true

Running "uglify:applib" (uglify) task
[TypeError: Cannot assign to read only property 'warnings' of true]

I ran into this error while copying an old grunt build that I had made. It seemed that the error came from uglify. I looked through the code but found nothing. I started changing random values. Then I found the cause:

uglify: {  
   options: {  
      compress: true  
   } 
}

The error is that compress does not take true as a value. It should be set to {} instead:

uglify: {  
   options: {  
      compress: {}
   } 
}