angular-phonecat tutorial karma install error

Getting into the angular phonecat demo, in windows, and early on hit a snag.

This one was from trying to update karma, a TDD framework for angular powered by node.js

Seemed pretty straight forward from what I have learnt from node so far.

npm install karma

Nothing like error messages from an unfamiliar environment to make you sit up in your chair.

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Dev\angularTutorial\angular-phonecat\scripts
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Dev\angularTutorial\angular-phonecat\scripts\npm-debug.log
npm ERR! not ok code 0

After I quick google search, with nothing initially, I realised I have some something really weird, that caused a error the likes of which no one has ever seen, or the solution was starting me in the face.

npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0

...like that.

npm install karma-requirejs

Karma then installed.

However, then the test.bat as part of the angular tutorial, which runs the karma command in DOS, returned this old favourite.

'karma' is not recognized as an internal or external command,
operable program or batch file.

Before clogging up my PATH variable, the -g (--global) variable in npm install came to mind.

However this did not work, even after first uninstalling the package.

Though, this time a  Stackoverflow answer at the top of google let me know that at least this time I was not so alone.

npm install -g karma-cli

Leave a Reply