running yeoman angular generator, karma dependency error
Asked Answered
B

2

5

I'm trying to run the generator-angular yeoman generator. But after installing and running it I get the following error

npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/debuglog/0.0.2
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/debuglog/0.0.2
npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@~0.10.0

npm ERR! System Darwin 13.1.0
npm ERR! command "/Users/harrymoreno/.nvm/v0.11.11/bin/node" "/Users/harrymoreno/.nvm/v0.11.11/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev"
npm ERR! cwd /Users/harrymoreno/programming/js/temp
npm ERR! node -v v0.11.11
npm ERR! npm -v 1.3.25
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/harrymoreno/programming/js/temp/npm-debug.log
npm ERR! not ok code 0

npm list karma returns

[email protected] /Users/harrymoreno/programming/js/temp
└── [email protected]  peer invalid

npm ERR! peer invalid: [email protected] /Users/harrymoreno/programming/js/temp/node_modules/karma
npm ERR! not ok code 0

so I think I have karma version 0.12.0 But grunt-karma wants 0.10.0 ?? I also install karma locally to my temp dir to see if that made a difference. It didn't.

Betaine answered 11/3, 2014 at 7:48 Comment(0)
T
7

The problem is [email protected] and [email protected] don't go hand in hand. The best way to deal with this problem is uninstall karma V 12 and install v 0.11.14 and [email protected]

$ npm uninstall karma grunt-karma

$ npm install [email protected] [email protected]

this should fix your problem.

Threecolor answered 11/3, 2014 at 8:49 Comment(2)
any reason we don't uninstall and install globally here? just curiousBetaine
I also ran into issues with generator-karma not being ~0.6.0 so I just gave generator-angular what it wanted by doing npm install -g [email protected] My takeaway being don't think too much and just give the module you're installing whatever it wants.Betaine
B
0

I've also gotten such errors. I had karma installed globally.

So I removed it and run the generator-angular yeoman generator again.

It installed [email protected] and [email protected] and it seems to be all ok.

Blanchblancha answered 11/3, 2014 at 21:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.