【问题标题】:Grunt not being found when installing grunt-sass with Node.js via Git Bash on Windows 10在 Windows 10 上通过 Git Bash 使用 Node.js 安装 grunt-sass 时找不到 Grunt
【发布时间】:2017-07-02 09:39:21
【问题描述】:

我正在学习 Lynda.com 上关于使用 Node.js 下载包等的课程。 我已完全按照说明进行操作。 我已经安装了最新版本的 Node.js,

我通过 Git Bash 安装了最新版本的 Grunt,如下所示

Nicholas@NicksDesktop MINGW64 /
$ npm install -g grunt cli
C:\Users\Nicholas\AppData\Roaming\npm\grunt -> C:\Users\Nicholas\AppData\Roaming\npm\node_modules\grunt\bin\grunt
C:\Users\Nicholas\AppData\Roaming\npm
+-- cli@1.0.1
`-- grunt@1.0.1

当我通过 Git Bash 输入以下内容时 npm install --save grunt-sass 我收到以下错误

npm WARN grunt-sass@2.0.0 requires a peer of grunt@>=0.4.0 but none was installed.

我该如何解决这个问题?

【问题讨论】:

  • 我在 Git Bash 中输入了 'npm list' 并得到这个错误 'npm ERR! peer dep 缺失:grunt@>=0.4.0,grunt-sass@2.0.0 需要'

标签: node.js windows sass gruntjs


【解决方案1】:

我通过 Git Bash 导航到安装 grunt-sass 的文件夹,然后进入

npm install grunt@0.4.0

这似乎修复了错误,似乎在此之后安装了最新版本和所需的旧版本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-20
    • 2018-09-05
    • 1970-01-01
    • 2017-01-26
    • 2014-08-07
    • 1970-01-01
    相关资源
    最近更新 更多