需要 grunt@>=0.4.0 的同伴

requires a peer of grunt@>=0.4.0

为什么会出现以下错误?我的 grunt 版本是 > v0.4.0

npm install grunt-contrib-concat --save-dev

+-- UNMET PEER DEPENDENCY grunt@>=0.4.0

错误信息:

..Projects\Hartz\Hartz>npm install grunt-contrib-concat --save-dev Hartz@1.0.0 C:..\Projects\Hartz\Hartz +-- UNMET PEER DEPENDENCY grunt@>=0.4.0 `-- grunt-contrib-concat@1.0.1

npm WARN grunt-contrib-jshint@1.0.0 requires a peer of grunt@>=0.4.0 but none was installed. npm WARN grunt-contrib-concat@1.0.1 requires a peer of grunt@>=0.4.0 but none was installed. npm WARN Hartz@1.0.0 No repository field.

咕噜 -V

grunt-cli v1.2.0
grunt v1.0.1

在本地(不是全局)安装 grunt。

npm install grunt --save-dev

它应该有帮助,因为 grunt-contrib-concat 正在寻找本地安装的 grunt 模块。