1

I have been running grunt on my computer for the last year and now it and other commands all randomly stopped working.

When trying to run grunt --version, says "The term 'grunt' is not recognized.

I tried loading

npm install -g grunt
npm install --save-dev grunt
npm install -g grunt-cli
npm install --save-dev grunt-cli

Checked my environment variables, and those look fine...

C:\Users\Wdd\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin;
C:\Users\Wdd\.dnx\bin;
C:\Users\Wdd\AppData\Local\Programs\Python\Python35-32\Scripts\;
C:\Users\Wdd\AppData\Local\Programs\Python\Python35-32\;
C:\Users\Wdd\AppData\Roaming\npm (verified the grunt files are actually here)

Completely lost at this point, have spent 5 hours trying to fix this. Have gone through like 10 Stack overflow pages but they are all talking about env variables.

Here is some additional info. npm -v = 2.7.4, node -v = 0.12.2,
(these are working from command line) I am an admin on this computer.

What else could possibly be going on here??

William Howley
  • 375
  • 3
  • 18

2 Answers2

0

You're installing both the grunt dependency and the CLI as globals; the CLI is the only package that should be installed globally. Re-install grunt without the global flag (-g): npm install grunt --save-dev

theaccordance
  • 879
  • 5
  • 13
0

Apparently my environment variables were off. But I had to change them via the registry. Found the answer in this post. gulp command not found - error after installing gulp

Community
  • 1
  • 1
William Howley
  • 375
  • 3
  • 18