如何安装Grunt

7

我使用Homebrew安装了Node.js,然后使用npm install安装了Grunt及其依赖项,但是在安装完成后,我无法运行Grunt:

zsh: correct 'grunt' to 'grn' ÆnyaeÅ? n
zsh: command not found: grunt

什么是安装Grunt的正确方法,以避免出现错误?
2个回答

21

要在命令行上使用Grunt,您必须安装命令行界面:

npm install -g grunt-cli

-g 标志用于全局安装模块,这也会为 Grunt 创建一个 PATH 变量。


3
npm install -g grunt-cli   => This will put the grunt command in your system path

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接