Strange error on Angular project and safari with unexpected token

84 Views Asked by At

Safari browser with version 13.1 show error SyntaxError: Unexpected token '=' and that doesn't specify the line number or file.Angular version is 16

Is there any way to narrow down which request or script is causing the error?

1

There are 1 best solutions below

1
On

This is likely due to a nullish coalescing assignment. This old version doesn't support it.

You should change the browserslist config to include Safari 13 (which by the way is not officially supported anymore by Angular).