-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Can not load "coverage", it is not registered!" error when running #59
Comments
I forgot to add karma-coverage to the list of plugins. This should be added to the sample config in the readme. |
@apond what is your set up look like? The recommended way is to install karma and all the plugins in your project (not global). Then, Karma automatically loads all the plugins (karma-*). |
@vojtajina All of my setup is shown above. I have installed karma and the plugins. Without the plugins listed in the config file this doesn't work. What is the alternative? |
You can list the plugins, but it should work without it. By default, Karma loads |
I am having the same problem currently, it worked fine yesterday, but now it says can not load 'webpack'/'coverage'/'sourcemap' did you forget to install it? i have them in the devDep., and did npm i already. Also having 'Perhaps you are missing some plugin' for those 3 as well. |
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. |
I got it working by doing the same thing, thanks for replying! |
@davidpricedev @ryoia I just got the same issue working with webpack, and when I run |
awesome @simon-nguyen ! |
I ran karma with gulp and got the same issue, fixed as @apond mentioned: |
I've found that if I declare the |
I still facing that error with out explicitly specify |
plugins need to be installed locally as devdependencies as stated in the readme then the auto loading works as expected |
@dignifiedquire I also install it locally, i just notice that it work after i explicitly specify |
@dignifiedquire I can confirm the behavior of @brutalcrozt. |
I got the same [WARN] because the plugin 'karma-coverage' was not defined inside the plugins of the config, try to see if adding it fixes your warning, not sure if it will fix your full problem.
|
For me, none of these suggestions help:
(I'm on |
I had this problem on the build server (team city) and it turned out to be because I'd installed karma globally, instead of I have no plugins defined in config, they are loaded automatically via their naming convention. |
@davidpricedev , Thanks a lot. It helped) |
I have a similar issue but may be specific to the reporter: |
This error message means the npm module containing the registration entries did not execute. So the module was not Using logLevel debug may help: |
エラーメッセージを検索して、対処していった。 プラグイン不足 - javascript - Vue-test-utils can't find `Set()`: ReferenceError: Can't find variable: Set - Stack Overflow https://stackoverflow.com/questions/53764988/vue-test-utils-cant-find-set-referenceerror-cant-find-variable-set - javascript - karma plugin dependencies not being found - Stack Overflow https://stackoverflow.com/questions/32425580/karma-plugin-dependencies-not-being-found - Error: No provider for "framework:mocha"! (Resolving: framework:mocha) · Issue #42 · karma-runner/karma-mocha karma-runner/karma-mocha#42 (comment) - Reporter plugins not working with karma 1.1.1? · Issue #2246 · karma-runner/karma karma-runner/karma#2246 (comment) - "Can not load "coverage", it is not registered!" error when running · Issue #59 · karma-runner/karma-coverage karma-runner/karma-coverage#59 (comment) Chrome Headless を使用するために Chromium インストールとパスを設定 apt-get update apt-get install chromium hromium --version export CHROME_BIN=/usr/bin/chromium - [launcher]: No binary for Chrome browser on your platform. · Issue #62 · karma-runner/karma-chrome-launcher karma-runner/karma-chrome-launcher#62 - Dockerを使ってHeadless Chromeを動かしてみる - Qiita https://qiita.com/dd511805/items/dfe03c5486bf1421875a - Puppeteer をDockerコンテナで利用する - Qiita https://qiita.com/HeRo/items/9be64b559692e12cc109 Chrome Headless の起動オプション設定 - ChromeHeadless can't run as root with --no-sandbox anymore · Issue #158 · karma-runner/karma-chrome-launcher karma-runner/karma-chrome-launcher#158 (comment)
I added 'karma-coverage', but still no files being found... 😥 Coverage reports should cover ALL files by default, and it should be EASY to configure this. Currently, this is a seriously horrible dev experience, just sayin'. |
I had the same problem and just fix it after added 'karma-coverage' package, and then, in the karma.conf.js file, remove the require of karma-coverage-istanbul-reporter, and finally add the require of the new package, like this: require('karma-coverage') I hope this will be helpfull. |
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'],
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?
The text was updated successfully, but these errors were encountered: