I have been practicing with this WeatherForecast PWA Blazor sample app from the "Blazor WebAssembly by Example" book, and the app's been working like a charm within VS2022 IDE. But when I run it and click on the button to install it, the installed version never runs properly, and it gets perpetually stuck with the "Loading..." message displayed in its run window.
When I looked under Dev Tools...Console (F12) in the browser, I saw this error repeated twice:
Uncaught SyntaxError: Unexpected token '<'
And the source of the error was the blazor.webassembly.js
file, which was the file Blazor itself created.
I also saw this error below:
DevTools failed to load source map: Could not load content for https://localhost:7163/css/bootstrap/bootstrap.min.css.map: Connection error: net::ERR_CONNECTION_REFUSED
And I am wondering if I even have the right environment to run this app outside of the VS IDE. Does it run using Kestrel or is Kestrel something that's only used within the IDE or via command line? Do I need the IIS installed locally to run this? I installed the IIS and started the service, but there was no difference at all.
Apparently, I am missing an important step, but am not sure what exactly.