In my project directory, I installed Grunt by using the following mand:
npm install grunt
...after that I did Grunt server in my project directory but it gives me mand not found error.
Raj$ grunt server
-bash: grunt: mand not found
And:
npm install grunt
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
How can I fix it?
In my project directory, I installed Grunt by using the following mand:
npm install grunt
...after that I did Grunt server in my project directory but it gives me mand not found error.
Raj$ grunt server
-bash: grunt: mand not found
And:
npm install grunt
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
How can I fix it?
Share Improve this question edited Aug 28, 2014 at 20:15 vdenotaris 13.6k27 gold badges83 silver badges136 bronze badges asked Mar 17, 2014 at 5:03 user3413185user3413185 6- so you have the json file package.json? gruntjs./getting-started#package.json – Denis Tsoi Commented Mar 17, 2014 at 5:06
- @denis thanks for your reply yes I have package.json filr – user3413185 Commented Mar 17, 2014 at 5:12
- Sorry for asking, but I'm assuming that you have node, npm installed? (check with node -v and npm -v)... also - is node, npm installed globally (with sudo or with the -g) – Denis Tsoi Commented Mar 17, 2014 at 5:16
- Also - What are your versions for node and NPM – Denis Tsoi Commented Mar 17, 2014 at 5:19
- 2 You need grunt-cli, check this stackoverflow./a/18877352/1366361 – 91bananas Commented Mar 17, 2014 at 5:27
2 Answers
Reset to default 6You need to install Grunt's mand line interface (CLI) globally as well.
From their site:
npm install -g grunt-cli
You may need to use sudo
mand (for OSX, *nix, BSD etc) or run your mand shell as Administrator (for Windows) to do this.
This will put the grunt mand in your system path, allowing it to be run from any directory.
You will have to install grunt after installing node / npm with: npm install -g grunt
. Then it will be available at the cmd.