Question

Following the instruction for setting up grunt angular templates: https://npmjs.org/package/grunt-angular-templates

I install the grunt-angular-template by doing:

npm install grunt-angular-templates --save-dev

It installs.

My package.json is just a very simple:

{
  "name": "grunt_example2",
  "version": "0.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "grunt-angular-templates": "~0.4.7"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "BSD-2-Clause"
}

And I create a Gruntfile.js as

module.exports = function(grunt) {
  grunt.loadTasks('grunt-angular-templates');
}

when I do:

grunt ngtemplates

I get: Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

But that gives me nothing on how to resolve this.

Any tips?

Thanks.

Was it helpful?

Solution

You need to install grunt into your project. See here: http://gruntjs.com/getting-started#installing-grunt-and-gruntplugins

npm install grunt --save-dev

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top