gpt4 book ai didi

javascript - 包 grunt 不满足其 sibling 的 peerDependencies 要求

转载 作者:搜寻专家 更新时间:2023-10-31 23:12:45 28 4
gpt4 key购买 nike

我正在尝试创建我的 grunt 构建但陷入了以下错误

npm WARN package.json Dependency 'grunt' exists in both dependencies and devDependencies, using 'grunt@~0.4.2' from dependencies
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-contrib-requirejs@0.4.4 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-config@0.1.8 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-string-replace@0.2.8 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-clean@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-cssmin@0.10.0 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jshint@0.11.0 wants grunt@~0.4.5
npm ERR! peerinvalid Peer grunt-contrib-uglify@0.8.0 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-exec@0.4.6 wants grunt@~0.4

作为here提到,我卸载了我的 Node 、npm 和 grunt 并重新安装了它们,但仍然面临同样的问题?

有什么想法吗?

我的 JSON 依赖项是:

"dependencies": {
"grunt": "~0.4.2",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-config": "~0.1.4",
"grunt-string-replace": "~0.2.7",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-cssmin": "~0.10.0"
},
"devDependencies": {
"grunt": "0.4.2",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": ">0.8.0",
"grunt-contrib-uglify": ">0.3.2",
"load-grunt-tasks": ">=0.3.0",
"requirejs": ">=2.1.10",
"grunt-exec": "~0.4.5"
}

同样的事情对我的同事来说效果很好。

最佳答案

我今天遇到了类似的错误,通过升级 npm 修复了它:

npm install -g npm

我有 2.14 版本,升级后变成 3.8

关于javascript - 包 grunt 不满足其 sibling 的 peerDependencies 要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28745468/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com