I cloned purecss project to my desktop and tried to run grunt on it since I saw there is a gruntfile included.
Running "bower-install" task
Warning: Cannot find module 'bower' Use --force to continue.
Of course a saved a local grunt to project folder as well as all the necessary plugins.
The problem should be with bower, I have to admit I never used it, but I ran a npm install -g bower
in terminal just in case, but no change.
The bower install task from gruntfile.js:
// -- Bower Tasks --------------------------------------------------------------
grunt.registerTask('bower-install', 'Installs Bower dependencies.', function () {
var bower = require('bower'),
done = this.async();
bower.commands.install()
.on('log', function (data) {
if (data.id !== 'install') { return; }
grunt.log.writeln('bower ' + data.id.cyan + ' ' + data.message);
})
.on('end', function (results) {
if (!Object.keys(results).length) {
grunt.log.writeln('No bower packages to install.');
}
done();
});
});
Probably you did not run npm install
in your project directory.
npm install
will install all dependencies defined in package.json
, which contains your bower
module too.