I am working on an Angular 17 + Tauri application, and I encountered the following error when running the app on macOS 10.15.7 or lower:
SyntaxError: Unexpected token '=' promiseReactionJob
Observations:
- The app works perfectly on macOS versions newer than 10.15.7.
- The error occurs specifically on macOS 10.15.7 and lower.
- Removing the following browserslist section from package.json does not affect the issue—I still get the same error regardless of the macOS version:
"browserslist": [ "> 0.5%", "last 2 versions", "Firefox ESR", "not dead", "not IE 11", "not kaios 2.5", "not op_mini all" ]
What I Have Tried:
- Removing browserslist from package.json → no change.
- Checking Tauri and Angular compatibility for older macOS versions.
- Ensuring that the Angular app is compiled properly before bundling with Tauri.
Questions:
- Why does this error occur specifically on macOS 10.15.7 and lower?
- Could this be related to the system's WebView version not supporting some modern JavaScript syntax?
- How can I make the Angular + Tauri app work on older macOS versions without errors?
Any help would be greatly appreciated!
I am working on an Angular 17 + Tauri application, and I encountered the following error when running the app on macOS 10.15.7 or lower:
SyntaxError: Unexpected token '=' promiseReactionJob
Observations:
- The app works perfectly on macOS versions newer than 10.15.7.
- The error occurs specifically on macOS 10.15.7 and lower.
- Removing the following browserslist section from package.json does not affect the issue—I still get the same error regardless of the macOS version:
"browserslist": [ "> 0.5%", "last 2 versions", "Firefox ESR", "not dead", "not IE 11", "not kaios 2.5", "not op_mini all" ]
What I Have Tried:
- Removing browserslist from package.json → no change.
- Checking Tauri and Angular compatibility for older macOS versions.
- Ensuring that the Angular app is compiled properly before bundling with Tauri.
Questions:
- Why does this error occur specifically on macOS 10.15.7 and lower?
- Could this be related to the system's WebView version not supporting some modern JavaScript syntax?
- How can I make the Angular + Tauri app work on older macOS versions without errors?
Any help would be greatly appreciated!
Share Improve this question asked Feb 6 at 6:50 humans9198humans9198 571 silver badge7 bronze badges 3- I would be helpful of you could give the code or other indicators where this error is thrown. – Borewit Commented Feb 7 at 10:49
- the problem is i cant find the root cause of the error, tauri webview console only showing the error but you cant even click or showing which line the error came from, and the app is working just fine in normal browser and even safari – humans9198 Commented Feb 8 at 13:00
- "Could this be related to the system's WebView version not supporting some modern JavaScript syntax?" -> Yes. – rozsazoltan Commented 2 days ago
2 Answers
Reset to default 0I was experiencing the similar problem on Ubuntu 20.04 while using Angular 17. I had previously developed an application that worked fine on Ubuntu 20.04, so I built my new project on top of the old one. However, I was still facing the same problem. I had the same problem with new applications I installed from scratch with different package managers. I think the package-lock.json file causes some incompatibilities while being created. You can try using the package-lock.json file that you used in an old working project. I solved the problem this way.
solved it by adding "Safari >= 13" @ browserslist