Hi Team,
I have node 15.1 and node 10.x. The same Karma with Angular 9 Tests work fine in node 10.x. But when it is used with node 15.1 we are getting the following error and the test breaks abruptly. There is no pattern other than the below error.
12 11 2020 12:19:28.046:ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined
at handleRangeHeaders (
at processRequest (
at ready (
at handleRequest (
at
at new Promise (
at middleware (
at
at call (
at next (
at
at call (
at next (
at nullProxy (
at call (
at next (
Our issues are related I think.
https://github.com/karma-runner/karma/issues/3570
Ya maybe @ekdev2 . But our tickets have a different error trace.
I use node 15.2.0, and karma 5.2.3, and I also get this error. It showed up recently.
Downgrading node to v 14.15.1 works
We only support LTS versions. Also the call stack points to webpack. Maybe add some logging to narrow down the issue.
@johnjbarton I see the same error on node 14.15.2.
Amazing, a minor Node update that broke all tests.
For those running Debian/Ubuntu, I've fixed that by uninstalling nodejs, downloading nodejs_14.15.1-deb-1nodesource1_amd64.deb from nodesource pool and installing it with sudo dpkg -i ....
If you have a problem on node v14, please open a issue. This issue is about v15 which we do not support.
Hi @johnjbarton I am facing same problem with node v14.15.2.
17 12 2020 07:18:56.924:ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined
Its working fine with our previous node v14.15.1.
Please provide us solution as soon possible.
Hi @johnjbarton I am facing same problem with node v14.15.2.
17 12 2020 07:18:56.924:ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined
Its working fine with our previous node v14.15.1.Please provide us solution as soon possible.
i also get same issue docker pipeline get error in ng test command
Please do not comment on this bug unless your comment is about node 15. We don't support v15 so we don't plan to reopen this bug.
If you have a problem with v14, please open an issue.
There is a bug in node v14.15.2 that impacts webpack, #3588
Node v14 isn't supported on Apple Silicon.
Therefore, you cannot (currently) run karma on Apple Silicon machines.
Edit: Err, at least natively. If you follow the instructions here: https://stackoverflow.com/questions/64963370/error-cannot-install-in-homebrew-on-arm-processor-in-intel-default-prefix-usr, you can run Node v14 via Rosetta and karma will run just fine:
/usr/sbin/softwareupdate --install-rosetta --agree-to-licensearch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"/usr/local/ rather than /opt/homebrew when running natively on Apple Silicon).arch -x86_64 brew install node@14/usr/local/bin/npm i -g @angular/cli/usr/local/bin/ng test@nvahalik I'm using an M1 mac book, and it works for me! Thanks!!
Most helpful comment
Hi @johnjbarton I am facing same problem with node v14.15.2.
17 12 2020 07:18:56.924:ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined
Its working fine with our previous node v14.15.1.
Please provide us solution as soon possible.