grunt-npm-install
grunt-npm-install copied to clipboard
Does not work when in a chain with other grunt task
I have the following grunt configuration:
[previous grunt configuration]
grunt.loadNpmTasks('grunt-npm-install');
grunt.loadNpmTasks('grunt-bower-task');
grunt.registerTask('build', ['npm-install', 'bower']);
If I have installed on my machine only 'grunt-npm-install' and run the command grunt npm-install It works fine:
$ grunt npm-install
>> Local Npm module "grunt-bower-task" not found. Is it installed?
Running "npm-install" task
[email protected] node_modules/grunt-bower-task
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Done, without errors.
However, if I run grunt build it fails:
$ grunt build
>> Local Npm module "grunt-bower-task" not found. Is it installed?
Warning: Task "bower" not found. Use --force to continue.
Aborted due to warnings.
Any workaround for this problem? If we are not able to run this task in a chain, makes no sense to use it because I can just use npm install instead.