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

Node.js 0.11.15 compress: true error #287

Closed
XhmikosR opened this issue Jan 22, 2015 · 13 comments · Fixed by #300 or ecofic/ngCordovaMocks#9
Closed

Node.js 0.11.15 compress: true error #287

XhmikosR opened this issue Jan 22, 2015 · 13 comments · Fixed by #300 or ecofic/ngCordovaMocks#9

Comments

@XhmikosR
Copy link
Member

Running "uglify:minify" (uglify) task
[TypeError: Cannot assign to read only property 'warnings' of true]
>> Uglifying source dist/htmlminifier.js failed.
Warning: Uglification failed.
Cannot assign to read only property 'warnings' of true.
 Use --force to continue.
uglify: {
  options: {
    banner: '<%= banner %>',
    compress: true,
    mangle: true,
    preserveComments: false,
    report: 'min'
  },
  minify: {
    files: {
      'dist/htmlminifier.min.js': '<%= concat.dist.dest %>'
    }
  }
}

If I comment out compress: true or change it to compress: { drop_console: true } everything goes well.

This only happens with Node.js 0.11.15 regardless of OS: https://travis-ci.org/kangax/html-minifier/jobs/47934702

@KrisSiegel
Copy link

Also running into this issue but haven't had a chance to track down its source.

@XhmikosR
Copy link
Member Author

I feel like it's a bug in node but haven't had the chance to look into it
closer either.
On Jan 31, 2015 8:48 PM, "Kris Siegel" notifications@github.com wrote:

Also running into this issue but haven't had a chance to track down its
source.


Reply to this email directly or view it on GitHub
#287 (comment)
.

@robertdunaway
Copy link

I installed NodeJS on a new machine and I now have this problem on the new machine but not the old machine. For me it only happen with ngannotate. Concat and Uglify work.

@XhmikosR
Copy link
Member Author

XhmikosR commented Feb 7, 2015

BTW I see it with 0.11.16 too.

@bricss
Copy link

bricss commented Feb 7, 2015

Getting this error in Node 0.12 & Io 1.1.0

@bricss
Copy link

bricss commented Feb 7, 2015

Problem was solved by adding:

compress : {
  warnings: false
}

@XhmikosR
Copy link
Member Author

XhmikosR commented Feb 7, 2015

Or you can just remove it completely because your way will silence the warnings.

@travischoma
Copy link

Any more ideas on this one besides disabling compress? Had to disable it in io 1.1.0

@braoru
Copy link

braoru commented Feb 13, 2015

Same bug on 0.12.0 for me

@giannisp
Copy link

options: { compress: {} } seems to be working for me with 0.12.0.

@tremby
Copy link

tremby commented Mar 4, 2015

Please clarify: is compress: true not allowed any more? Should I use compress: {} instead to mean the same thing (compress with whatever the default options are)?

@bricss
Copy link

bricss commented Mar 4, 2015

Everything works as is, just update to latest version. Bug was resolved.

@tremby
Copy link

tremby commented Mar 4, 2015

D'oh -- you're right. I had somehow updated to 0.7.0 (where the bug remained) rather than 0.8.0. Thanks.

marcandre added a commit to guillaumepotier/Parsley.js that referenced this issue Mar 15, 2015
jaisonerick added a commit to jaisonerick/textAngular that referenced this issue Apr 15, 2015
There was an error on uglify on compress: true (gruntjs/grunt-contrib-uglify#287)

It was fixed on 0.8
dmonllao added a commit to eat-this-one/eat-this-one that referenced this issue Apr 25, 2015
SergioCrisostomo added a commit to SergioCrisostomo/mootools-core that referenced this issue Sep 8, 2015
update grunt-contrib-uglify version because of
gruntjs/grunt-contrib-uglify#287
royrusso added a commit to ElasticHQ/elasticsearch-HQ that referenced this issue Oct 27, 2015
royrusso added a commit to ElasticHQ/elasticsearch-HQ that referenced this issue Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants