I am getting an error when trying to run a Svelte 5 (with SvelteKit) application as a SPA hosted by an ASP.NET Core application in IIS.
I am building the app using astatic adapter with a fallback file of index.html.
When I launch the app, the index.html file is loaded, I see a data call run successfully from a load function I have in a +page.ts file, however nothing renders on the screen.
If I check the console output, I see the following error:
Uncaught (in promise) Error: https://svelte.dev/e/lifecycle_outside_component
Note: Routing seems to be working so I don't think that's the issue. If I make a dynamic route, like /my-route, I get the same error as above. However, if I try a route that doesn't exist, like /fake-route, in the console output I see "gn: Not found: /fake-route", followed by the same lifecycle error.
Also, the app runs fine in dev mode through Vite. It's only when it's run from the ASP.NET app that this issue occurs.