gpt4 book ai didi

node.js - 警告 grunt-cssc@0.2.6 需要 grunt@~0.4.1 的对等体,但没有安装

转载 作者:搜寻专家 更新时间:2023-11-01 00:39:38 25 4
gpt4 key购买 nike

这里需要什么?我尝试安装所有引用资料:

>npm install

hertz@1.0.0 C:...\BowerAndGrunt `-- UNMET PEER DEPENDENCY grunt@1.0.1

npm WARN grunt-cssc@0.2.6 requires a peer of grunt@~0.4.1 but none was installed. npm WARN hertz@1.0.0 No repository field. npm ERR! code 1

Package.json:

{
"name": "hertz",
"version": "1.0.0",
"description": "desc",
"main": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "legends",
"license": "MIT",
"dependencies": {
"grunt": "^1.0.1"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-csslint": "1.0.0",
"grunt-contrib-cssmin": "1.0.2",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-sass": "1.0.0",
"grunt-contrib-uglify": "2.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-htmlhint": "0.9.13",
"jshint-stylish": "^2.2.1",
"matchdep": "1.0.1"
}
}

最佳答案

npm install --save-dev grunt

这是因为 grunt-cssc 需要安装 grunt 但您没有在 pacakge json 中定义它。阅读更多关于对等依赖的信息

https://nodejs.org/en/blog/npm/peer-dependencies/

编辑:

因为它要求的是一个低于版本 1 的 grunt。通过以下链接在 npm 中 checkout semver:

github.com/npm/node-semver#tilde-ranges-123-12-1

基本上这意味着您的 cssc 库需要 grunt 0.4 而不是 grunt 1,但希望它也能与 grunt 1 一起工作。

你可以联系 lib 作者,让他也升级到支持 grunt 1。

关于node.js - 警告 grunt-cssc@0.2.6 需要 grunt@~0.4.1 的对等体,但没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39317145/

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