How to fix "There is no server listening on port 9876" error while running karma?

javascript, karma-runner, node.js, npm

Solution

They changed the delivery model for Karma recently

To install Karma itself, as you have already done:

npm install karma -g

But then you need to install drivers for testing frameworks. For example for QUnit

npm install karma-qunit --save-dev

Next you have to install launchers for the different browsers. For example Chrome and IE

npm install karma-ie-launcher --save-dev
npm install karma-chrome-launcher --save-dev

And now you should be good to go.

Now simply launch karma by using the start command with the config file as an input

karma start path/to/tests/karma.conf.js 

Problem

I am running the following: ``` PS D:\app> karma run ``` It shows the error: ``` [2013-11-29 17:39:54.297] [DEBUG] config - Loading config D:\app\karma.conf.js There is no server listening on port 9876 ``` How do I fix this?

Original source