Legends Legends - 3 months ago 79
Node.js Question

WARN grunt-cssc@0.2.6 requires a peer of grunt@~0.4.1 but none was installed

What is needed here?
I tried to install all the references:

>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"
}
}

Answer

do

npm install --save-dev grunt

this is because grunt-cssc needs grunt installed but you didnt' define it in your pacakge json. read more on peer dependencies

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

Comments