Skip to content


Subversion checkout URL

You can clone with
Download ZIP


ngtemplates task Warning: Object.keys called on non-object #56

amayvs opened this Issue · 5 comments

2 participants


Trying to run grunt build on a Yeoman scaffolded app with grunt-angular-templates as one of the tasks, generates the following errors:

>> Tasks directory "grunt-angular-templates" not found.

Also gives the following error:

Running "ngtemplates:TestApp" (ngtemplates) task
Warning: Object.keys called on non-object Use --force to continue.

Isolated run command: grunt ngtemplates:TestApp

Link to TestApp below:
Github repo

I'm not sure what is causing these errors.


1st off, great issue :) Well doc'd, example code, the works!

I think I know the cause of this, and should have it patched shortly.



1st, because you are using require('load-grunt-tasks')(grunt);, you won't need the grunt.loadTasks('grunt-angular-templates'); instruction on

2nd, I found the root cause and am patching now. Thanks!


BTW, here's the output of grunt ngtemplates now:

angular.module('TestApp').run(['$templateCache', function($templateCache) {

    "<div class=\"hero-unit\">\n" +
    "  <h1>'Allo, 'Allo!</h1>\n" +
    "  <p>You now have</p>\n" +
    "  <ul>\n" +
    "      <li ng-repeat=\"thing in awesomeThings\">{{thing}}</li>\n" +
    "  </ul>\n" +
    "  <p>installed.</p>\n" +
    "  <h3>Enjoy coding! - Yeoman</h3>\n" +


Also, you're referencing which doesn't exist. For now, I'd leave off the htmlmin part until you're ready to optimize your app.


1st off, Thanks for fixing this so quickly. Appreciate it.

2nd, my bad, was copied over from another app of mine.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.