question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Can not load "coverage", it is not registered!" error when running

See original GitHub issue

I install karma-coverage like this: npm install karma-coverage --save-dev

I have a package file that contains this: “devDependencies”: { “karma”: “0.10.2”, “karma-coverage”: “0.1.5”, “karma-junit-reporter”: “0.1.0”, “karma-jasmine”: “0.1.3”, “karma-chrome-launcher”: “0.1.0”, “karma-ie-launcher”: “0.1.1”, “karma-safari-launcher”: “0.1.1”, “karma-firefox-launcher”: “0.1.0” },

And a config file that looks contains this: // test results reporter to use // possible values: ‘dots’, ‘progress’, ‘junit’, ‘growl’, ‘coverage’ reporters: [‘dots’, ‘junit’, ‘coverage’],

preprocessors: {
  // source files, that you wanna generate coverage for
  // do not include tests or libraries
  // (these files will be instrumented by Istanbul)
  'jstarget/**/*.js': ['coverage']
},

// configure the coverage reporter
coverageReporter: {
  type : 'html',
  dir : 'coverage/'
},

And I get an error that looks like this: WARN [reporter]: Can not load “coverage”, it is not registered! Perhaps you are missing some plugin?

What do I need to do?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

45reactions
apondcommented, Feb 10, 2014

I forgot to add karma-coverage to the list of plugins. This should be added to the sample config in the readme.

9reactions
davidpricedevcommented, Aug 5, 2015

I had this problem as well. I was able to get things working once I deleted all the global karma packages and reinstalled karma-cli as the only global (karma-related) package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run Coverage with Karma - Stack Overflow
Having locally karma plugins and launching a globally installed karma will result in 'karma-coverage'-not-registred type of error as well. – ...
Read more >
karma-coverage installed, but preprocess ... - Google Groups
The unit test is executing and succeeding, but when I tried to implement coverage, it says: WARN [preprocess]: Can not load "coverage", it...
Read more >
TypeScript code coverage with Karma
Configuring code coverage with TypeScript and Karma to get coverage reports for code ... ERROR [preprocess]: Can not load “webpack”, it is not...
Read more >
Test Coverage with Karma - Matthew Odle
Code Coverage of Jasmine Tests using Istanbul and Karma Capturing browser with ... Cannot load browser "PhantomJS": it is not registered!
Read more >
Can Not Load "Coverage"! Message When Trying To Run ...
05 09 2018 17:00:21.991:ERROR [config]: File D:\TestData\KARMA\ClientApp\C:\Program Files\JetBrains\JetBrains Rider 182.4231.439\plugins\jskarma\jsreporter\.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found