Angular 19 App fails to load (JS Syntax error?/possible unsupported JS version)
I have an app built in Angular 19 that is failing to run properly in an otherwise functional kiosk environment, leading to the dreaded "black screen" error. The background color is set to the default black, so that much is normal. The kiosk setup is operational and works normally if I set the kiosk URL to https://wpewebkit.org. It also properly loads individual JPEG images from my server app. The logs indicate that when I set the kiosk URL to the index page for my app, it loads the index page with no errors reported. The index page then requires the loading the 2 JS scripts specified in the index (the polyfills script and the app script) which result from the production angular build. The log shows the following errors:
2025-04-01T17:43:16-07:00 -[76140]: http://192.168.50.30:8099/myapp/slideshow Load started. 2025-04-01T17:43:16-07:00 -[76140]: http://192.168.50.30:8099/myapp/slideshow Loading... 2025-04-01T17:43:17-07:00 -[76140]: http://192.168.50.30:8099/myapp/slideshow Loaded successfully. 2025-04-01T17:43:17-07:00 wpe-webkit-mir-kiosk.daemon[76156]: http://192.168.50.30:8099/myapp/polyfills-FFHMD2TL.js:1: CONSOLE JS ERROR SyntaxError: Unexpected token '{' 2025-04-01T17:43:17-07:00 wpe-webkit-mir-kiosk.daemon[76156]: http://192.168.50.30:8099/myapp/main-TN3AC62V.js:8: CONSOLE JS ERROR SyntaxError: Unexpected token '{'
I tried debug mode true and while there were more log entries, these were the only errors of note.
I enabled devmode and opened the console. As expected from the failure, the elements view showed only the app-root DOM element and nothing below it where the app would normally show.
Descriptions of similar errors in similar environments seem to indicate that something like this can happen when a browser uses an older version of JavaScript than the Angular app requires. My tsconfig.json is set to output ES2022 compatible code (target and module) in the build.
Are there known constraints on supported JavaScript versions? Anything else (e.g. known problems or config settings) I should look at as a possible cause for the above errors?
Thanks for any help you can provide!
App host environment: Intel X64 pico-ITX board. Ubuntu 24.04 with latest updates Latest ubuntu-frame snap installed (set to daemon mode) Latest wpe-webkit-mir-kiosk snap installed (set to daemon mode) Angular app built with Angular 17 production mode with default options - hosted via a jetty server embedded in my app on the same device. Angular app loads and runs normally using latest Chrome, Chromium, and Firefox on same device as well as from a secondary device on same internal network (laptop with Ubuntu 24.04 and latest updates) using Chrome and Firefox.