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.

Karma error after update to version 6.0.0

See original GitHub issue

Hi,

I get following error after update:

ERROR [karma-server]: Server start failed on port 9876: Error: No provider for "customFileHandlers"! (Resolving: framework:@angular-devkit/build-angular -> customFileHandlers)   
ERROR [karma-server]: Error while calling exit event listeners
TypeError: Cannot read property 'name' of undefined
    at TfsReporter.onExit (C:\Dev\***\spa\node_modules\karma-tfs-reporter\index.js:53:38)
    at Server.<anonymous> (C:\Dev\***\spa\node_modules\karma\lib\events.js:40:26)
    at Server.emit (events.js:327:22)
    at Server.emitExitAsync (C:\Dev\***\spa\node_modules\karma\lib\server.js:146:12)
    at Server._close (C:\Dev\***\spa\node_modules\karma\lib\server.js:413:10)
    at Server.start (C:\Dev\***\spa\node_modules\karma\lib\server.js:120:12)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
devoto13commented, Jan 14, 2021

Note that 6.0.0 is a major release, which has breaking changes. It is not compatible with the current release of @angular-devkit/build-angular package, hence the error. You should have received a warning about incompatible peer dependency from NPM when you updated to it.

The support for Karma 6.0.0 has already been added to Angular CLI (https://github.com/angular/angular-cli/pull/19784) and will probably be released in 11.1.0. Until then, please stick with Karma 5.x.

0reactions
devoto13commented, Jan 15, 2021

Unfortunately we don’t have a process to backport changes at the moment… I guess we can either try to make a patch release on 5.x branch or restore customFileHandlers provider with the deprecation warning on the 6.x branch (so people can use Karma 6.x with older Angular CLI with the peer dependency warning).

@johnjbarton Which option do you think is better?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma not running unit test after Angular 12 upgrade
Before the upgrade karma is running the unit tests without any issues. However, after the upgrade this is what we end up with....
Read more >
Angular CLI 6.0.0 and Karma: Karma server don't rebuild code ...
Hi! I'm using the current WebStorm 2018.1.4 and the standard Angular CLI 6.0.0 Karma configuration. If I try to test changed code, the...
Read more >
Changelog - Karma test runner
cli: Karma is more strict and will error out if unknown option or argument is passed to CLI. Using Karma to run Dart...
Read more >
karma-users - Google Groups
Asynchronous UT could not run normal after upgrade to the latest version @6.3.4. The karma version under @6.0.0 is ok for my UT....
Read more >
Karma - npm
Spectacular Test Runner for JavaScript.. Latest version: 6.4.1, last published: 3 months ago. Start using karma in your project by running ...
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