Grunt on Windows 8: 'grunt' is not recognized

前端 未结 11 2031
刺人心
刺人心 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:37

    I've not had any issues with grunt on several different windows 8 machines.

    If you open the folder: C:\Users\[username]\AppData\Roaming\npm

    Do you have a file named grunt.cmd in this folder?

    If not I'd maybe try npm install -g grunt-cli again, maybe from an elevated command prompt.

    If this exists and you have C:\Users\[username]\AppData\Roaming\npm in your PATH environment variable then typing grunt from a command prompt should work.

    Silly question, have you tried closing the command prompt and opening a new one?

提交回复
热议问题