karma: UnhandledRejection: Cannot read property 'range' of undefined
Karma version 5.2.3 Node version 14.15.2
After running the tests Chrome exits and I get the following error:
ERROR [karma-server]: UnhandledRejection: Cannot read property 'range' of undefined
ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined
I suspect this to be related to #3571, node version 14.15.1 works correctly.
Please let me know if I need to provide more information.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 19 (4 by maintainers)
I don’t think this issue is in Karma core. From #3571 it looks like the issue is in the
@angular-devkit\build-angularplugin. I’ve tested with fresh@angular/cli@11project and issue is not reproducible. Please consider below options:In any case, there is nothing we can do on the Karma core to fix issue in the third-party plugin as we don’t develop this plugin.
Happy to re-open if you provide a minimal reproduction showing that this issue is caused by the Karma core.
downgrading from node v15 to v14.16.0 helped, tests are working now
@TeaTimeForever Make sure you use the Angular CLI version, where the fix is included.
v 14.15.3 is released https://nodejs.org/en/download/
Ok thanks. Did not know this pinned thing 😉
@tbprojects Open up
karma/lib/server.jsand findAdd a line above:
The message should include the stack and that will help us.
FWIW I tested locally against 14.15.1 and 14.15.2 so any issue between these versions isn’t visible to our tests.