I'm having a problem running Grunt from the command line on my Windows 8 machine.
My research indicates the most common solution is to install grunt-cli, since Grunt is no longer global. I also need to make sure I actually install the Grunt task runner, since that's not installed with grunt-cli.
Other solutions point to the PATH system environment variable, but that appears to be pointed as I'd expect to:
C:\Users[username]\AppData\Roaming\npm
Having done all that, I'm still getting a "'grunt' is not recognized as an internal or external command, operable program or batch file" error message in the CLI. I've tried the following things, uninstalling everything after every attempt:
- Installed grunt-cli globally (npm install -g grunt-cli), then grunt at the directory level I want to use it (npm install grunt)
- The same as above, but with the order of installation reversed
- The same as both of the above, but using the Admin Command Prompt
Am I missing something obvious?
npm install -g grunt-cli, typewhere grunt. What's the output? - WiredPrairiegrunt.cmdlocated in yourAppData\Roaming\npmfolder? - WiredPrairiePATHfrom the command prompt. There's really no other explanation that makes sense given the error you're describing and the steps. - WiredPrairieNODE_PATH= to%AppData\npmwhich translates to the correct path. Then, in myPath, I added%NODE_PATH%and that did not work. I think it didn't like the variable containing another variable. Meaning that in DOS I could notcd %NODE_PATH%butcd %AppData%\npmworked just fine. So I ended up just adding the complete path in mySystemvariable tonpmand moved on. Works now. - cbmeeksNODE_PATHvariable is wrong; you wrote%AppData\npmand it should be%AppData%\npm- mejdev