Loading "Gruntfile.js" tasks...ERROR
carlhako opened this issue · 2 comments
Your example Gruntfile.js in your tutorial gives me an error when trying to run grunt.
$ grunt
Loading "Gruntfile.js" tasks...ERROR
Error: Cannot find module 'load-grunt-tasks'
Warning: Task "default" not found. Use --force to continue.
Aborted due to warnings.
I am still very new to bower and grunt yet to work out how to fix this. Also when running
bower install bootstrap --save grunt
my index.html file is not updated.
my Gruntfile.js
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
wiredep: {
task: {
src: ['views/index.html']
}
}
});
grunt.registerTask('default', ['wiredep']);
};
You don't neeed that line. Just replace it with grunt.loadNpmTasks('grunt-wiredep');
and the rest of your code should be good to go.
This is our official guide: http://stephenplusplus.github.io/grunt-wiredep/
@kanakiyajay it might be good to avoid using load-grunt-tasks
to prevent this sort of confusion.
@stephenplusplus Thanks for pointing this out. I have updated it in the repo.