Grunt on Windows 8: 'grunt' is not recognized

前端 未结 11 1984
刺人心
刺人心 2020-11-29 01:07

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 Gru

11条回答
  •  [愿得一人]
    2020-11-29 01:29

    I know this has been answered but I thought I'd offer my step by step solution for windows 8.

    First thing I checked was the PATH in my laptops Environment Variables (Right click my computer > properties > advanced system settings > Environment Variables)

    It wasn't listed in there so I added a new variable in User variables (so it was specific only to my user account)

    In the new user variable prompt I entered the following;

    Variable Name: PATH
    
    Variable Value: %USERPROFILE%\AppData\Roaming\npm
    

    Quit command prompt, repoened, navigated to my projects directory and tried running grunt again and... SUCCESS!

提交回复
热议问题