Karma runs on Node.js and is available as an NPM package.
On Mac or Linux we recommend using NVM. On Windows, download Node.js
from the official site or use the NVM PowerShell Module.
Karma currently works on Node.js 6.x
, and 10.x
. See FAQ
for more info.
Installing Karma and plugins
The recommended approach is to install Karma (and all the plugins your project needs) locally in
the project's directory.
$ npm install karma --save-dev
$ npm install karma-jasmine karma-chrome-launcher jasmine-core --save-dev
This will install
jasmine-core packages into
node_modules in your current
working directory and also save these as
package.json, so that any
other developer working on the project will only have to do
npm install in order to get all these
$ ./node_modules/karma/bin/karma start
./node_modules/karma/bin/karma start sucks and so you might find it useful to install
karma-cli globally. You will need to do this if you want to run Karma on Windows from the command line.
$ npm install -g karma-cli
Then, you can run Karma simply by
karma from anywhere and it will always run the local version.