Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SyntaxError: Unexpected token '.' after trying to load an angular website

Tags:

angular

safari

I receive this error in safari on my iPhone after trying to access an angular website:

SyntaxError: Unexpected token '.'

The website is then just stuck on a white screen without providing more information.

How can i solve this problem?

like image 901
Derivaz Luca Avatar asked Apr 12 '26 19:04

Derivaz Luca


1 Answers

I remembered, that i once had the same problem trying to open an ionic app. I fixed the problem by lowering the target version in my tsconfig.json file:

enter image description here

In my case i had to go from es2020 to es2018 to make it work, since i have installed an older ios version (13.3.1) on my test device.

I hope it helps some of you!

like image 62
Derivaz Luca Avatar answered May 07 '26 19:05

Derivaz Luca



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!