-
Notifications
You must be signed in to change notification settings - Fork 124
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 broken as of node version 20.13.0
#829
Comments
can reproduce. seems that it's binding to the external ip of the local machine. |
Also reproduced. swa --version = sw_vers = |
I investigated and it seems that there has been a change in the behavior of node's http module. There are two ways to deal with this. static-web-apps-cli/src/msha/server.ts Line 174 in 352be8f
If you do either of these, it looks like you can get it to work with |
@yamachu can you expand on what you mean by:
please? |
Normally when you are developing an application using the SWA CLI, you would access the web front application by accessing http://127.0.0.1:8082 or http://localhost:8082 Instead, you access it by typing the localIp address(private ip address?) in the address bar of your browser within the network to which the machine you are currently serving is part of (you can see this address in ifconfig, etc.). |
Ah I see - so this would not be something that you could commit to source control as it would be potentially different for each user. Incidentally I can reproduce this with 1.1.9 also. |
Highly recommend using patch-package (https://www.npmjs.com/package/patch-package) on this project at this point. Lets you do little tweaks like the above PR and check it into source control so any developer on the team can benefit. |
We've released version 1.1.10 recently that explicitly has Node 20 support. Please let us know if you are still having problems. Thanks! |
Describe the bug
The SWA CLI does not work with node version
20.13.0
or later (also tested with20.13.1
and22.1.0
).There are no issues with node
20.12.2
.Running
swa start
does not report any errors. However after succesful startup ofswa start
the URLhttps://127.0.0.1:8082
(orhttps://localhost:8082
) simply refuse connections (Chrome reportERR_CONNECTION_REFUSED
).To Reproduce
Steps to reproduce the behavior:
20.12.2
setup some SWA project. Verify thatswa start
work as expected.20.13.0
. SWA is no longer working (butswa start
report no errors).Expected behavior
Nothing should break upgrading from node
20.12.2
to20.13.0
(or later).Desktop (please complete the following information):
1.1.7
Additional context
swa-cli.config.json
:The text was updated successfully, but these errors were encountered: