question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

html-minifier hangs with --minify-js

See original GitHub issue

Command never returns and an empty file is created. No problems without --minify-js

Create empty file. (also happens with real html file) touch test.html

html-minifier -o test.min.html --remove-comments --collapse-whitespace test.html works.

html-minifier -o test.min.html --remove-comments --collapse-whitespace --minify-js test.html never returns.

Any help appreciated.

Turns out also --minify-css is broken for me.

β”œβ”€β”¬ html-minifier@3.0.3
β”‚ β”œβ”€β”¬ change-case@3.0.0
β”‚ β”‚ β”œβ”€β”€ camel-case@3.0.0
β”‚ β”‚ β”œβ”€β”€ constant-case@2.0.0
β”‚ β”‚ β”œβ”€β”€ dot-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ header-case@1.0.0
β”‚ β”‚ β”œβ”€β”€ is-lower-case@1.1.3
β”‚ β”‚ β”œβ”€β”€ is-upper-case@1.1.2
β”‚ β”‚ β”œβ”€β”€ lower-case@1.1.3
β”‚ β”‚ β”œβ”€β”€ lower-case-first@1.0.2
β”‚ β”‚ β”œβ”€β”€ no-case@2.3.0
β”‚ β”‚ β”œβ”€β”€ param-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ pascal-case@2.0.0
β”‚ β”‚ β”œβ”€β”€ path-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ sentence-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ snake-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ swap-case@1.1.2
β”‚ β”‚ β”œβ”€β”€ title-case@2.1.0
β”‚ β”‚ β”œβ”€β”€ upper-case@1.1.3
β”‚ β”‚ └── upper-case-first@1.1.2
β”‚ β”œβ”€β”¬ clean-css@3.4.19
β”‚ β”‚ β”œβ”€β”€ commander@2.8.1
β”‚ β”‚ └─┬ source-map@0.4.4
β”‚ β”‚   └── amdefine@1.0.0
β”‚ β”œβ”€β”¬ commander@2.9.0
β”‚ β”‚ └── graceful-readlink@1.0.1
β”‚ β”œβ”€β”€ he@1.1.0
β”‚ β”œβ”€β”¬ ncname@1.0.0
β”‚ β”‚ └── xml-char-classes@1.0.0
β”‚ β”œβ”€β”€ relateurl@0.2.7
β”‚ └─┬ uglify-js@2.7.3
β”‚   β”œβ”€β”€ async@0.2.10
β”‚   β”œβ”€β”€ source-map@0.5.6
β”‚   β”œβ”€β”€ uglify-to-browserify@1.0.2
β”‚   └─┬ yargs@3.10.0
β”‚     β”œβ”€β”€ camelcase@1.2.1
β”‚     β”œβ”€β”¬ cliui@2.1.0
β”‚     β”‚ β”œβ”€β”¬ center-align@0.1.3
β”‚     β”‚ β”‚ β”œβ”€β”¬ align-text@0.1.4
β”‚     β”‚ β”‚ β”‚ β”œβ”€β”¬ kind-of@3.0.4
β”‚     β”‚ β”‚ β”‚ β”‚ └── is-buffer@1.1.4
β”‚     β”‚ β”‚ β”‚ β”œβ”€β”€ longest@1.0.1
β”‚     β”‚ β”‚ β”‚ └── repeat-string@1.5.4
β”‚     β”‚ β”‚ └── lazy-cache@1.0.4
β”‚     β”‚ β”œβ”€β”€ right-align@0.1.3
β”‚     β”‚ └── wordwrap@0.0.2
β”‚     β”œβ”€β”€ decamelize@1.2.0
β”‚     └── window-size@0.1.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ubershmekelcommented, May 13, 2018

It isn’t explained clearly what that value should be, and it is unfortunate that html-minifier just hangs instead of errors 😦

1reaction
bjoe2k4commented, Sep 20, 2016

Okay, thanks, works now. Some warning would have been nice, since this worked without value quite nice in earlier versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js - What is the most robust way of handling an external ...
The 'easy' answer is: Don't use that module. You should never use a module that just freezes up your entire server - that's...
Read more >
Freeze on open minifying files .js or .css
Hi @Pit Z , thanks for your feedback! We're aware that a number of VS features slow down when opening files containing very...
Read more >
Top 5 html-minifier Code Examples - Snyk
Learn more about how to use html-minifier, based on html-minifier code examples created from the most popular ways it is used in public...
Read more >
Online HTML Minifier and Compressor - hung1001
Put HTML Code Here. <html> <body> <style> #minify{border:1px solid #444;height:220px;width: 100%;} </style> <div class='nav'> <ul> <li><aΒ ...
Read more >
Should you minify HTML? - Quora
I would suggest webpack , you can also try this html-minifier . ... Usually, there's a lot more lower-hanging fruit in most websites...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found