Cannot install phantomJS in Karma

Marty Lavender picture Marty Lavender · Aug 30, 2013 · Viewed 33.8k times · Source
WARN [config]: config.configure() is deprecated, please use config.set() instead.
WARN [plugin]: Cannot find plugin "karma-phantomjs".
  Did you forget to install it ?
  npm install karma-phantomjs --save-dev
INFO [karma]: Karma v0.10.2 server started at http://localhost:9018/
WARN [launcher]: Can not load "PhantomJS", it is not registered!
  Perhaps you are missing some plugin?

Getting this error. When running npm install karma-phantomjs --save-dev I get an error.

npm ERR! 404 'karma-phantomjs' is not in the npm registry.

I installed karma-phantomjs-launcher --save-dev but i still get an error when running grunt watch.

Anyone else run into this issue?

Answer

Ben Gao picture Ben Gao · Apr 15, 2014

npm install karma-jasmine --save-dev

npm install karma-phantomjs-launcher --save-dev

Then add the following line to karma.config.js

plugins : ['karma-jasmine', 'karma-phantomjs-launcher']