generator-karma does not satisfy its siblings' peerDependencies requirements

All we need is an easy explanation of the problem, so here it is.

The same notorious error

npm ERR! peerinvalid The package generator-karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.6.0
npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.5.0

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "generator-angular"
npm ERR! cwd /Users/dmitrizaitsev/Dropbox/Priv/APP/my-yo-project
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21

comes from installation various packages, e.g. for

npm update -g yo

The only found advice to uninstall generator-karma does not help – it re-installs back.

Any better explanation of why it happens and working solution?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Try running npm uninstall -g generator-karma

Method 2

You need to update all of your globally installed NPM packages. Run this command from your console:

npm update -g

This command will update all the packages listed to the latest version (specified by the tag config).

It will also install missing packages.

When you specify the -g flag, this command will update globally installed packages. If no package name is specified, all packages in the specified location (global or local) will be updated.

Method 3

I had a similar issue and I did this in terminal:

rm -rf /usr/local/lib/node_modules/karma-*

and then updated the package.json:

  "devDependencies": {
    "karma": "0.12.0",

then reinstall

sudo npm install karma

It worked for me

Method 4

It fixed it by running this command, which installs the latest version from GitHub:

$ npm install -g git://

Method 5

i was able to install simply by:

npm install karma-generator

Guess it installs a later version of Karma. I was able to successfully install generator-angular after that. Was able to get coffeescript going as well after doing the above.

Method 6

I had permissions issues with some of the directories under /usr/local/lib/node_modules. I must have installed some packages with sudo but most under my own user id. I solved this issue on a Mac with these commands:

sudo chown -R `whoami` /usr/local/lib/node_modules/
sudo chgrp -R admin /usr/local/lib/node_modules/

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply