npm ERR: peerinvalid The package generator-karma does not satisfy its siblings peerDependencies requirements
Asked Answered
M

5

12

When I run

 npm install -g yo grunt-cli bower

at my terminal I get the following dependency error:

npm ERR! peerinvalid The package generator-karma does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants generator-karma@~0.5.0
npm ERR! System Darwin 12.4.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo" "grunt-cli" "bower"
npm ERR! cwd /Users/ryanwieghard/code/angin/indie-cinema-tools
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/ryanwieghard/code/angin/indie-cinema-tools/npm-debug.log
npm ERR! not ok code 0

I am not sure how to resolve this. Is there a way to manually install generator-karma@~0.5.0 ?

Mllly answered 18/10, 2013 at 16:53 Comment(0)
F
35

The new version of yeoman installs bower and grunt for you (so you don't need those on your npm line anymore). So, just to be safe remove what you have:

npm remove -g yo bower grunt-cli

And then try this install

npm install -g yo

Some people still experience the problem you're having though, here's the issue and in comments are a number of different things to try if the above doesn't resolve your issue: https://github.com/yeoman/generator-angular/issues/220

Folksy answered 18/10, 2013 at 19:51 Comment(1)
I've removed and reinstalled everything I can think of based on this thread, the one you've linked and many others. In cannot install generator-angular or generator-socketio OR generator-karma. Each reports this error that seems to always come back to generator-karma and I think it failing to install is the root of the issue but I don't have my brain wrapped around NPM enough to understand this any further.Floeter
B
11

https://mcmap.net/q/363783/-how-to-remove-a-yeoman-generator

This helped me.

I uninstalled all the dependent generators which are throwing error

npm uninstall -g generator-[generator-name]

Update Yo

npm update -g yo

Install the required generator

npm install -g generator-[generator-name]
Benzoin answered 16/9, 2014 at 14:54 Comment(1)
Yeah, I did the accepted answer and then this and finally got a result.Graver
B
6

This one helped me:

npm uninstall -g generator-karma && npm install -g generator-angular
Backwoodsman answered 26/11, 2013 at 22:22 Comment(1)
Doesn't work any more - generator-karma seems to be installed again and cause the problemFrum
H
3

Before updating or re-installing yo, you must remove all generators (in my case generator-angular)

npm remove -g generator-angular

Then you can update yeoman

npm update -g yo

And smile :)

Houppelande answered 22/9, 2014 at 20:50 Comment(0)
F
0

I had to do "sudo rm -rf /usr/local/lib/node_modules/generator-karma" then npm update -g yo

Frodi answered 7/5, 2015 at 16:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.