Front end - installed grunt globally, still prompts, grunt is not an internal or external command
大家讲道理
大家讲道理 2017-05-15 16:55:43
0
3
661

After installing grunt with the command npm install -g grunt-cli npm install -g grunt
Run the command grunt -v or grunt and it keeps prompting that 'grunt' is not an internal or external command, nor is it an operable program...


This is my environment variable configuration

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
習慣沉默

Cannot be installed globally grunt 值要安装 grunt-cli就可以了,然后在 %AppData%Roamingnpm 会生成一个 grunt.cmdIt means the installation is successful.

伊谢尔伦

Guess: pathThe semicolon in the path won’t be a Chinese semicolon, right?

洪涛

Open

C:\Users(用户)\你的用户名\.npmrc 

Change this file
to

prefix=C:\Program Files\nodejs\node_modules
cache=C:\Program Files\nodejs\node_cache
registry = http://registry.cnpmjs.org

The first two are the two folders under the node installation path

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template