Closed Ouwen closed 9 years ago
htmlmin is the cause of this, so you either have to disable it, change your html, or modify the settings.
How can I know which files are affected?
I use grunt to run html min, so I enable verbose mode
grunt build -v
Grunt will then usually get stuck on the template which has the problem. It does not tell me where in the file the problem is, but opening the file on an IDE usually tells me if any tags have been left open or properties have been incorrectly mentioned.
I rinse and repeat.
(hope someone can give you a better answer)
Thanks ! this is working for me using verbose mode.
This issue should not be closed, it still remains. This happens to me and there is no issue with htmlmin or any other task, I runned them all individually, everything passes but still it gets stuck:
Running "ngtemplates:main" (ngtemplates) task
There is no output of any type to know what is happening. I updated all the dependencies. So better error output handling please.
@eduardoinnorway the issue does lie in html-minifier
. Have you tried running with --verbose
turned on? You should see it output Minifying file: [html markup]
at the point where it's hanging. If you don't see this, make sure you're not running your grunt task as part of an npm script, as it may not take your --verbose
flag. I would also recommend using https://github.com/praveenvijayan/grunt-html-validation or https://github.com/htmllint/grunt-htmllint as part of your build task if you're running into this problem, it should help you catch it.
Running with --verbose helped me discover the bad markup that caused the minifier to choke.
This answer has helped me. Thanks @zsiswick
@dev-d "grunt build -v"
hey its worked for me.... thanks dude 👍
For some reason grunt gets stuck here
Running "autoprefixer:dist" (autoprefixer) task File .tmp/app/app.css created. File .tmp/app/app.css.map created (source map).
Running "ngtemplates:main" (ngtemplates) task
The reason seems to be that there is an error in the html. I added commas between html attributes. However I believe this should be parsed for errors.