Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用Homebrew安装 Node.js,然后使用npm install安装 Grunt 及其依赖项,但安装完成后,我无法运行 Grunt:
npm install
zsh: correct 'grunt' to 'grn' ÆnyaeÅ? n zsh: command not found: grunt
安装 Grunt 的正确方法是什么,所以我没有收到此错误?
要在命令行上使用 Grunt,您必须安装命令行界面:
npm install -g grunt-cli
该-g标志用于全局安装模块,这也将为 Grunt 创建一个 PATH 变量。
-g
npm install -g grunt-cli => This will put the grunt command in your system path