-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWA CLI Fails to Start the Application #42
Comments
I believe I have resolved this issue by adding a url property in the launch.json file. (Edit: I had to restart VS Code after modifying this launch.json file). Now, when I run and debug Client/Server everything works. I'm not sure if this is worth considering adding to the default repo or if that might be inappropriate for other environments. The final launch.json looks like this:
|
I think you may have run across multiple issues.
I hope this is helpful. |
@c0g1t8 Hi Gary, thanks a lot for taking the time to reply! |
You should close this issue if ti's resolved. 😄. |
Oops, sorry! I thought I closed after last comment. I'll close it now. |
While I'll post on Azure/static-web-apps-cli#663 I just wanted to say that I'm also having the I'm definitely struggling to use Blazor WASM + CosmosDB (local) through a local static web app. The only tutorial I can find for using Blazor+CosmosDB+SWA is Aaron Powell's blog post - sadly his accompanying repo, run in a dev container, results in a different issue. |
I followed the ReadMe directions for Visual Studio Code. Installed the latest VS Code v1.76.1 on Windows 11. Installed Azure Static Web Apps CLI and Azure Functions Core Tools CLI per the ReadMe file. Deleted the appsettings.Development.json file per the ReadMe.
When running the command "swa start http://localhost:5000 --api-location http://localhost:7071" , it attempts to start the application and eventually times out with this output:
[swa] - Waiting for http://localhost:5000 to be ready
[swa] ✖Waiting for http://localhost:5000 to be ready
[swa] ✖ Could not connect to "http://localhost:5000". Is the server up and running?
[swa] node "C:\Users\myusername\AppData\Roaming\npm\node_modules@azure\static-web-apps-cli\dist\msha\server.js" exited with code 0
Any ideas how to make this work?
Edit: I also tried to run and debug the Client/Server option and receive error "Unable to launch browser: "Could not open ...:5001/_framework/debug/ws-proxy?browser=ws%3A%2F%2F127.0.0.1%3A4477%2Fdevtoo..."
Edit2: Using the option to run and debug Client/Server is successfully launching the Azure Function Host but the error is happening after that when it tries to launch the wasm app in browser. If I wait for the Function Host to successfully start and ignore the launch error I can manually browse to http://localhost:5000 and the app is working properly. So perhaps if I just resolve the launch issue that will be sufficient.
The text was updated successfully, but these errors were encountered: