ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

Compiling Dist Stuck on ngtemplates:main task #112

Closed Ouwen closed 9 years ago

Ouwen commented 9 years ago

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.

ericclemmons commented 9 years ago

htmlmin is the cause of this, so you either have to disable it, change your html, or modify the settings.

molerat619 commented 9 years ago

How can I know which files are affected?

dev-d commented 9 years ago

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)

wintersummermint commented 8 years ago

Thanks ! this is working for me using verbose mode.

eduardoinnorway commented 8 years ago

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.

underscorebrody commented 8 years ago

@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.

zsiswick commented 8 years ago

Running with --verbose helped me discover the bad markup that caused the minifier to choke.

kasongoyo commented 7 years ago

This answer has helped me. Thanks @zsiswick

bharathnallamothu commented 6 years ago

@dev-d "grunt build -v" hey its worked for me.... thanks dude 👍