Reputation: 413
I am trying to install some Grunt plugins like grunt-contrib-clean
and grunt-contrib-watch
using npm install grunt-contrib-clean --save-dev
and npm install grunt-contrib-watch --save-dev
I got these warnings:
npm WARN [email protected] requires a peer of grunt@~0.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of grunt@~0.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of grunt@~0.4.1 but none is installed. You must install peer dependencies yourself.
How can I fix them?
Upvotes: 5
Views: 9482
Reputation: 413
I have fixed the problem,
npm update
npm install -g grunt-cli.
npm install grunt --save-dev
npm install grunt-contrib-watch --save-dev
npm install grunt-contrib-clean --save-dev
Upvotes: 0
Reputation: 1
In case this helps anyone with a similar problem I just received this error on a successful Grunt 1.0.4 install:
[email protected] requires a peer of grunt@~0.4.0 but none is installed
and none of the above answers worked, ie:
npm update
npm install grunt-contrib-concat --save-dev
did not resolve the problem / get the latest version
The only fix was to find THE LATEST VERSION of grunt-contrib-concat on git and overwrite explicitly:
[email protected] --save-dev
Upvotes: 0
Reputation: 63
mostly you didn't installed grunt locally
try to install grunt locally by run this command
npm install grunt --save-dev
Upvotes: 0