1

Here is my grunt config file - https://github.com/mdarif/JavaScript-Boilerplate/blob/1.3/GruntFile.js

It's not loading the module - grunt-template-jasmine-istanbul and getting Local Npm module "grunt-template-jasmine-istanbul" not found. Is it installed?

Loading the grunt tasks like require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

Hope someone can help quickly!

Mohammad Arif
  • 6,987
  • 4
  • 40
  • 42

2 Answers2

2

I have to install 'load-grunt-tasks' package to load multiple grunt tasks excludes grunt-template-jasmine-istanbul rather than 'matchdep' package then given code works like charm.

require('load-grunt-tasks')(grunt, {
  pattern: ['grunt-*', '!grunt-template-jasmine-istanbul']
});
Mohammad Arif
  • 6,987
  • 4
  • 40
  • 42
  • Thanks.. This solved jasmine-istanbul issue that i had.. But i still get TypeError: Cannot read property 'prototype' of undefined for karma js. – razor Apr 04 '17 at 03:09
0

as i told you in your other post. just install that module:

$ npm install grunt-template-jasmine-istanbul

you probably should save it into your package.json, you can do that directly when installing the plugin:

$ npm install grunt-template-jasmine-istanbul --save-dev

edit: if you use ..('matchdep').filterDev, it filters the devDependencies in your package.json. grunt-template-jasmine-istanbul is missing in your package.json! easiest way to fix that is the second command i gave you above!

hereandnow78
  • 14,094
  • 8
  • 42
  • 48
  • I already have the grunt-template-jasmine-istanbul abailable, seems like it's not loading the grunt module because of the pattern - require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); – Mohammad Arif Jun 22 '15 at 14:47
  • see my edit, you need to add it to the package.json! – hereandnow78 Jun 23 '15 at 08:01
  • It's already there friend - https://github.com/mdarif/JavaScript-Boilerplate/blob/1.3/package.json – Mohammad Arif Jun 23 '15 at 15:38
  • sry, i was missing that you are inside a branch, i used the Gruntfile-Link in your question and have navigated from there (somehow landing in the master branch) – hereandnow78 Jun 24 '15 at 06:29