Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The version of grunt is too old to install some grunt-plugins by npm #1815

Closed
dcalsky opened this issue Apr 22, 2016 · 7 comments
Closed

The version of grunt is too old to install some grunt-plugins by npm #1815

dcalsky opened this issue Apr 22, 2016 · 7 comments
Labels
Milestone

Comments

@dcalsky
Copy link

dcalsky commented Apr 22, 2016

Item Version
generator-angular-fullstack 3.6.0
Node 4.2.1
npm 2.14.7
Operating System OS X 10 / Windows 10 / Ubuntu 15.10 / etc
etc etc
Item Answer
Transpiler TypeScript
Markup Jade
CSS Stylus
Router ui-router
Build Tool Grunt
Client Tests Mocha
DB MongoDB
Auth Y
etc etc

grunt version is too old to install some grunt-plugins by npm ...

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.x
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@>= 0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@^0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0

So, I think it's important to update the version of grunt in the package.json

Like this

"grunt": "^0.4.5"
@Awk34
Copy link
Member

Awk34 commented Apr 22, 2016

This will fail on npm 2, but only warn on npm 3. If you can only install with npm 2, just change down to grunt 0.4.5

@dcalsky
Copy link
Author

dcalsky commented Apr 23, 2016

For compatibility, I think it's better to fix this problem on npm 2. Users who use npm 2 will meet the same problem like me.

@Awk34
Copy link
Member

Awk34 commented Apr 23, 2016

Ugh, annoying. I wonder if there's a way to force-install on npm 2.. There's one feature I recently added that depends on Grunt 1.0.0...

@Awk34 Awk34 added this to the Soon milestone Apr 23, 2016
@Awk34 Awk34 added the bug label Apr 23, 2016
@dcalsky
Copy link
Author

dcalsky commented Apr 23, 2016

That's sounded like a sad story.
Thanks for your hardworking anyway.

@Awk34
Copy link
Member

Awk34 commented Apr 23, 2016

I'll just have to revert the Grunt 1.0.0 change and put a note next to the feature that requires Grunt 1.0.0. We can't have everyone on npm 2 broken from the get-go!

@Awk34
Copy link
Member

Awk34 commented Apr 23, 2016

Now that I look at it, I should be able to keep the new feature. If the user chooses Gulp, we install Grunt 1 & grunt-build-control (with proper peerDependency allowing Grunt 1.0.0). This allows us to have gulp buildcontrol tasks by proxying to Grunt + grunt-build-control, which requires Grunt ^1.0.0. Reverting to using Grunt 0.4.5 when a user chooses Grunt should still be fine though.

@Awk34
Copy link
Member

Awk34 commented Apr 23, 2016

npm shouldn't be warning that [email protected] is PEERINVALID for grunt@>=0.4.5, though, since 1.0.0 >= 0.4.5 is definitely true..

@Awk34 Awk34 closed this as completed in 1cc91a3 Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants