Skip to content
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

Error with Karma 6: No provider for "customFileHandlers" #19815

Closed
1 task done
muuvmuuv opened this issue Jan 19, 2021 · 2 comments
Closed
1 task done

Error with Karma 6: No provider for "customFileHandlers" #19815

muuvmuuv opened this issue Jan 19, 2021 · 2 comments

Comments

@muuvmuuv
Copy link

🐞 Bug report

Command (mark with an x)

  • test

Is this a regression?

Yes, the previous version in which this bug was not present was: with karma 5.x

Description

In Karma version 6 customFileHandlers is deprecated in favour of the middleware functionality.

See: https://github.com/karma-runner/karma/releases/tag/v6.0.0

🔬 Minimal Reproduction

🔥 Exception or Error


19 01 2021 09:14:56.495:ERROR [karma-server]: Server start failed on port 9876: Error: No provider for "customFileHandlers"! (Resolving: framework:@angular-devkit/build-angular -> customFileHandlers)

🌍 Your Environment


Angular CLI: 11.0.7
Node: 14.15.4
OS: darwin x64

Angular: 11.0.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.6
@angular-devkit/build-angular   0.1100.7
@angular-devkit/core            11.0.6
@angular-devkit/schematics      11.0.7
@angular/cdk                    11.0.4
@angular/cli                    11.0.7
@angular/material               11.0.4
@schematics/angular             11.0.7
@schematics/update              0.1100.7
rxjs                            6.6.3
typescript                      4.0.5

Anything else relevant?

I am using https://github.com/just-jeb/angular-builders/tree/master/packages/custom-webpack to add a custom webpack to my tests.

devoto13 added a commit to devoto13/karma that referenced this issue Jan 19, 2021
The removal of `customFileHandlers` turned out to be more disruptive change than anticipated as this provider is still used by several popular plugins: karma-runner#3619, codymikol/karma-webpack#462, angular/angular-cli#19815. Hence we restore the provider and print a deprecation warning to make upgrading easier. This should give more time for the plugin authors to release new versions and users to adopt these versions.
devoto13 added a commit to devoto13/karma that referenced this issue Jan 19, 2021
The removal of `customFileHandlers` turned out to be more disruptive change than anticipated as this provider is still used by several popular plugins: karma-runner#3619, codymikol/karma-webpack#462, angular/angular-cli#19815. Hence we restore the provider and print a deprecation warning to make upgrading easier. This should give more time for the plugin authors to release new versions and users to adopt these versions.
devoto13 added a commit to devoto13/karma that referenced this issue Jan 19, 2021
The removal of `customFileHandlers` turned out to be more disruptive change than anticipated as this provider is still used by several popular plugins: karma-runner#3619, codymikol/karma-webpack#462, angular/angular-cli#19815. Hence we restore the provider and print a deprecation warning to make upgrading easier. This should give more time for the plugin authors to release new versions and users to adopt these versions.
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Jan 19, 2021

This is expected as Karma 6 is not supporte in Angular CLI 11.0.

It will be supported in Angular CLI 11.1. See: #19784

You can try using the prerelease version by running:

ng update @angular/cli --next

devoto13 added a commit to devoto13/karma that referenced this issue Jan 20, 2021
The removal of `customFileHandlers` turned out to be more disruptive change than anticipated as this provider is still used by several popular plugins: karma-runner#3619, codymikol/karma-webpack#462, angular/angular-cli#19815. Hence we restore the provider and print a deprecation warning to make upgrading easier. This should give more time for the plugin authors to release new versions and users to adopt these versions.
johnjbarton pushed a commit to karma-runner/karma that referenced this issue Jan 20, 2021
The removal of `customFileHandlers` turned out to be more disruptive change than anticipated as this provider is still used by several popular plugins: #3619, codymikol/karma-webpack#462, angular/angular-cli#19815. Hence we restore the provider and print a deprecation warning to make upgrading easier. This should give more time for the plugin authors to release new versions and users to adopt these versions.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants