javascriptangulartauri

Angular + Tauri: SyntaxError: Unexpected token '=' promiseReactionJob on macOS 10.15.7 or older


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:

  1. The app works perfectly on macOS versions newer than 10.15.7.
  2. The error occurs specifically on macOS 10.15.7 and lower.
  3. 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:

  1. Removing browserslist from package.json → no change.
  2. Checking Tauri and Angular compatibility for older macOS versions.
  3. Ensuring that the Angular app is compiled properly before bundling with Tauri.

Questions:

  1. Why does this error occur specifically on macOS 10.15.7 and lower?
  2. Could this be related to the system's WebView version not supporting some modern JavaScript syntax?
  3. How can I make the Angular + Tauri app work on older macOS versions without errors?

Any help would be greatly appreciated!


Solution

  • solved it by adding "Safari >= 13" @ browserslist