Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
amayvs opened this Issue · 5 comments

2 participants

@amayvs

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.

@ericclemmons

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.

Thanks!

@ericclemmons

1st, because you are using require('load-grunt-tasks')(grunt);, you won't need the grunt.loadTasks('grunt-angular-templates'); instruction on https://github.com/amayvs/TestApp/blob/master/Gruntfile.js#L368.

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

@ericclemmons

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

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

  $templateCache.put('views/main.html',
    "<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" +
    "</div>\n"
  );

}]);
@ericclemmons

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

https://github.com/amayvs/TestApp/blob/master/Gruntfile.js#L224
https://github.com/amayvs/TestApp/blob/master/Gruntfile.js#L228

@amayvs

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

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

Cheers

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.