-
Notifications
You must be signed in to change notification settings - Fork 56
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] localhost:4280 can't reach localhost:3000 (error 502) #1213
Comments
I have the same issue too. I can access the app at http://localhost:3000 and the CLI at http://localhost:4280. But getting a 502 when accessing the static app through the emulator |
Downgraded to version node version 16.20.1 using NVM and is working now locally. |
Exactly that did the trick, thanks @abylouis! Hopefully node 18.x will be supported soon. |
My team is experiencing the same thing, though we are building a Vue3 app. According to the MS-documentation, Node 18.x is still in preview when running the function app in node. The same probably applies to frontends which are served using node 18, even though MS don't mention it explicitly. |
I found a temporary solution in this thread. Try changing |
We're working on our Node 18 support! In the meantime, downgrading to Node 16 or using the solution of 127.0.0.1 instead of localhost works as @phille968 mentioned |
this worked beautifully. 👍 |
The SWA CLI version 1.1.4 has been deployed, bringing with it such fixes for Node 18. Update your SWA CLI version to get this fix! |
Hi all,
I'm currently developing a React app and started to use Azure Static Web Apps since this weekend.
The problem I'm facing is that when I start the App via 'swa start' command, everything spins up correct but when I want to open the website via the SWA development server (http://localhost:4280) I get an error 502.
Here are some facts:
I get the following log when I try to reach the app via localhost:4280:
[swa] GET http://localhost:3000/ (proxy)
[swa] ✖ GET http://localhost:3000/ - 502 (Bad Gateway)
And here's a picture of my browser:
My swa-cli.config.json
SWA CLI start output:
The same issues appear also in the Microsoft Train examples.
Does anybody have an idea where I can continue searching for issues? I feel a bit lost currently.
The text was updated successfully, but these errors were encountered: