Reputation: 33
All the npm installs gave errors and warnings but would say "Everything is ok" at the end. When I tried grunt serve, I got these warnings.
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-htmlmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-cssmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
>> Local Npm module "grunt-bower-requirejs" not found. Is it installed?
>> Local Npm module "grunt-eslint" not found. Is it installed?
>> Local Npm module "grunt-jscs" not found. Is it installed?
How do I fix it?
Upvotes: 3
Views: 8518
Reputation: 493
Try as below:
1) npm install -g grunt-cli
This will put the grunt command in your system path, allowing it to be run from any directory.
Note that installing grunt-cli does not install the Grunt task runner! The job of the Grunt CLI is simple: run the version of Grunt which has been installed next to a Gruntfile. This allows multiple versions of Grunt to be installed on the same machine simultaneously.
2) npm install grunt --save-dev
3) npm install grunt-serve
The easiest way to add Grunt and gruntplugins to an existing package.json is with the command npm install --save-dev. Not only will this install locally, but it will automatically be added to the devDependencies section, using a tilde version range.
for further assistance follow this link
http://gruntjs.com/getting-started
Upvotes: 1
Reputation: 1605
Are you installing on a Mac or Windows? First, make sure the Grunt Client is installed within your directory:
$ npm install -g grunt-cli
Then:
$ npm install grunt-serve
Further documentation of installation can be found here: https://www.npmjs.org/package/grunt-serve
Upvotes: 6