bashterminalgruntjsnpmgrunt-cli

Grunt installed but "command not found"


I'm trying to use Grunt on a project that I'm working on with someone else. My colleague installed Node, NPM, Grunt-CLI and created a Grunt task and uploaded the entire working directory to Github. When he runs the Grunt task it works fine.

I have Yosemite 10.10.4. I've pulled down a clone of the working directory from Github. But when I try and run the Grunt task I get >> /bin/sh: mysqldump: command not found Database dump failed!

I have done the following:

Is anyone able to help me identify the problem?

I've been following:

http://gruntjs.com/getting-started

http://www.hongkiat.com/blog/grunt-command-not-found/


Solution

  • As arco444 has said I needed to install the mysqldump plugin.

    https://www.npmjs.com/package/grunt-mysql-dump

    I hadn't realised that mysqldump was refering to a plugin, I had presumed that it was the name of the task that my colleague had created so I was just expecting that to be part of the work he had done to create the Grunt task in one of the associated configuration files.

    If you’re using MAMP, then mysql command line tools are not made available in your PATH automatically. For the above plugin to work, you must find out the path to these tools (On Mac OS: bundled in MAMP.app; on Windows/Linux: probably within the app's directory tree) and add that path to your PATH environment variable!

    In my case that was export PATH=/Applications/MAMP/Library/bin:$PATH