0

I have a build issue while running a unit test case in angular 9. environment Angular CLI: 9.1.12 Node: 15.1.0 OS: win32 x64 error:

enter image description here

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107

2 Answers2

2

Same error was coming for me too. I commented the if else block in nodemoodules/webpack-dev-middleware/lib/util.js 130. It is because it has undefined value. Now it is working fine. I am beginner, I don't know about the impact else where.

Suryaprakash
  • 80
  • 1
  • 11
0

It's an issue with karma on node v15, you'll have to downgrade to 14.

Issue at Karma: https://github.com/karma-runner/karma/issues/3571

See also: [karma-server]: TypeError: Cannot read property 'range' of undefined - Angular Unit Testing in CI environment

Joran
  • 211
  • 2
  • 5