-
Notifications
You must be signed in to change notification settings - Fork 338
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 issues with Node.js 18 #811
Comments
WorkaroundsThis is a suggestion for workarounds in users' workflows when using the built-in
Below are specific examples: AngularAngular 15 built with - name: Test
uses: cypress-io/github-action@v5
with:
start: npm start
wait-on: 'http://localhost:4200' fails on GitHub
Workaround: use the IPv6 loopback address At this time the literal IPv6 address - name: Test
uses: cypress-io/github-action@v5
with:
start: npm start
wait-on: 'http://[::1]:4200' ViteVite v3 & v4 built with - name: Test
uses: cypress-io/github-action@v5
with:
wait-on: http://localhost:5173
start: npm run dev fails on GitHub
Workaround: start server with - name: Test
uses: cypress-io/github-action@v5
with:
wait-on: http://localhost:5173
start: npx vite --host |
This comment was marked as resolved.
This comment was marked as resolved.
There are now generic workaround instructions posted to |
I think considering how limited we use I am going to bring this up to the team. I think whatever we decide to do, we need to have the same alignment across our tools repos, for example the netlify-plugin-cypress uses a very similar ping structure with |
I don't believe that upgrading |
I also tried to revive an old issue in facebook/create-react-app#11302 as an example server which is not listening on both stacks, but there hasn't been any response there either. |
* chore: upgrade docs-kit to v21 * chore: use node 18 for development * chore: upgrade gatsby to v5 * fix: import * ci: bump cache * chore(website): upgrade react to v18 * ci: use ipv4 loopback address (node v18 compatibility) bahmutov/start-server-and-test#181 facebook/create-react-app#11302 cypress-io/github-action#811 * chore: update docs analytics tags and beta link --------- Co-authored-by: Nikolaus Kuehn <[email protected]>
The typical Cypress approach here would be to try & find a solution that would handle both IPv4 and IPv6. This action is meant to be a convenience and provide easy CI setup and that would be inclusive of a local dev-setup. As for vite/angular workarounds - thank you for posting! Hopefully these user are able to use the CT testing successfully regarldess of I agree with @AtofStryker - Not worth updating the entire project to be ESM for one dependency with limited use. It be worth considering a different dependency to try & resolve this issue. Another dependency I was recently looking at swapped |
The discussion about ESM is a distraction, since updating There hasn't been much user-feedback on this issue lately, so perhaps the workarounds I posted are sufficient? |
got releases have now reached 13.0. This remains an ESM-only module, so updating requires migration work from CommonJS to ESM. |
The wait-on issues described here are not due to a bug in Workarounds were published to README > In the meantime, tests using Node.js Closing this issue as no special action is necessary for |
I'm experiencing this issue using Node
The workaround posted above of starting the server with |
Updating from the now deprecated This seems to be related to the fact that |
Problem description
With the GitHub migration of runners to use Node.js 18 as default on Feb 18, 2023, some workflows using the built-in
wait-on
parameter of cypress-io/github-actionare nowwere failing: for example, #760 withError: connect ECONNREFUSED 127.0.0.1:4200.
Edit: no longer failing due to workaround implementation.This affects development webservers which are not listening on both IPv4 and IPv6. Some, like vite, can be set to start and listen on
0.0.0.0
which solves the issue. Others don't seem to be so flexible.It also affects the alternate method of using start-server-and-test as an argument to the built-in
wait-on
parameter. Due to the fact that start-server-and-test depends on the separate npm module wait-on and this externalwait-on
also trips up on Node.js 18 in certain configurations, it also becomes a problem for start-server-and-test.Workarounds can be found, such as using the IPv6 loopback address
::1
instead of the more genericlocalhost
hostname. The workarounds differ depending on the dev webserver and the environment it is being run under.Questions
v12v13 version? This is a breaking change due to the migration from CommonJS to native ESM.The text was updated successfully, but these errors were encountered: