-
Notifications
You must be signed in to change notification settings - Fork 319
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
wait-on example changes for react-scripts and vite server under Node.js 18 #803
Conversation
Replace localhost by 127.0.0.1 or ip6-localhost for webservers in examples which do not listen on both IPv4 and IPv6 stacks
Until this PR is merged all other PRs will fail tests due to |
In draft, pending investigation of new vite version v4.1.3. |
The wait-on-vite issue is not resolved by updating to VITE 4.1.3 (latest) so I suggest to go ahead with this PR. The log confirms again the issue with GitHub dual definition of
See vite developer's information about stack and name usage depending on Node.js versions vitejs/vite#10638 (comment) which does not tie in to what is observed on GitHub currently. |
I resolved the vite issue by changing the startup of vite server to I had found this workaround some time ago, but I only just located the documentation in Vite Server Options server.host which confirms that it is a supported option. |
🎉 This PR is included in version 5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR resolves issue #802 "example-wait-on fails on GitHub waiting for localhost".
Due to the migration of GitHub runners to use Node.js 18, name resolution is behaving differently when accessing
localhost
. This affects webservers used for testing which only listen on IPv4 or IPv6, but not on both network stacks.In example-wait-on it changes the network name / address
127.0.0.1
and
npx vite --host
(see Vite Server Options server.host documentation)to allow the respective servers to be monitored until they are running, at which time control is passed to Cypress to carry out testing.