【问题标题】:How to install Grunt如何安装 Grunt
【发布时间】:2013-09-27 05:35:06
【问题描述】:

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

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

安装 Grunt 的正确方法是什么,所以我不会收到此错误?

【问题讨论】:

    标签: javascript node.js macos gruntjs npm


    【解决方案1】:

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

    npm install -g grunt-cli
    

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

    【讨论】:

      【解决方案2】:
      npm install -g grunt-cli   => This will put the grunt command in your system path
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-04-26
        • 2012-11-07
        • 2013-07-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多