Skip to content
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

Node 17 support #333

Closed
rtrembecky opened this issue May 11, 2022 · 20 comments · Fixed by #357
Closed

Node 17 support #333

rtrembecky opened this issue May 11, 2022 · 20 comments · Fixed by #357
Labels

Comments

@rtrembecky
Copy link

Bug report

Hi, as mentioned in #328 by several people, it seems the package doesn't support node 17+ or at least is unable to execute a command after the server is up and ready. I created a new issue in case it is a different topic than #328 (probably is).

  • version: 1.14.0 (latest)
  • platform: macOS Monterey 12.2.1
  • expected behavior: running start-server-and-test start 8000 cy:open should start the app server and open Cypress
  • actual behavior: running this ^ starts the server but doesn't open Cypress, hence it eventually times out
@itsyoboieltr
Copy link

bump

@rodoabad
Copy link

rodoabad commented Jul 19, 2022

It's been awhile since we saw an update for this repository so it might take awhile.

@gndelia
Copy link

gndelia commented Aug 16, 2022

I'm seeing the same issue with node 16, but I'm not with node 14. but instead of Cypress, I see it with serverless-offline

edit: Ok false alarm. The problem was not this package. It turns out the base url for serverless-offline changed, so the stage had to be suffixed. The previous URL now gave 404, causing to never be able to reach the target url. Using the DEBUG flag (See the readme) helped me to figure it out.

@rodoabad
Copy link

Node 16 should work. 17+ does not.

@CamilleDrapier
Copy link

This might be related to this issue (of the underlying wait-on lib), and the proposed solution/fallback (replace localhost by local IP) might work for people seeing this problem here: jeffbski/wait-on#109 (comment)

@rodoabad
Copy link

This might be related to this issue (of the underlying wait-on lib), and the proposed solution/fallback (replace localhost by local IP) might work for people seeing this problem here: jeffbski/wait-on#109 (comment)

What we did was actually the opposite (people can either do it one way or another).

We had a server that was starting at 0.0.0.0:8080 and wait-on couldn't wait for it since wait-on was waiting for localhost:8080. What we did instead is, change 0.0.0.0:8080 to localhost:8080 and it worked on us. We didn't have to change our npm script to include http://localhost:8080 for start-server-and-start it still stay at 8080 (shorthand).

@spectronp
Copy link

This might be related to this issue (of the underlying wait-on lib), and the proposed solution/fallback (replace localhost by local IP) might work for people seeing this problem here: jeffbski/wait-on#109 (comment)

It worked for me with 127.0.0.1

@actuallymentor
Copy link

Can confirm it does not work for 18 lts either.

vfdev-5 added a commit to pytorch-ignite/code-generator that referenced this issue Feb 1, 2023
vfdev-5 added a commit to pytorch-ignite/code-generator that referenced this issue Feb 1, 2023
* Update ci.yml

* Updated code formatting and fixed CI (#221)

* Updated code formatting

* Delete package-lock.json

* Fixed CI issue and updated dep version

* Updated netlify build env

* added --expect 200

* Added fix for Node17+, bahmutov/start-server-and-test#333
@nbouvrette
Copy link

@bahmutov is there any plan to fix this issues? Many tools are now using Node 18 as the default version since we are only 6 months away from having no support on Node 16.

@bahmutov
Copy link
Owner

Yes I will look into this

@bahmutov
Copy link
Owner

Can someone provide a reproducible example? I have tested this tool using Node v18 in #354 and don't see any problems.

@cbookg
Copy link

cbookg commented Feb 22, 2023

In my project only Mac users have issues, not Linux users.

@github-actions
Copy link

🎉 This issue has been resolved in version 1.15.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nbouvrette
Copy link

@bahmutov I just tested with version 2 and I got the issue happening again. I suspect there is another issue to fix.

It's only happening on this script:

    "e2e-build-headless-base-path": "cross-env CYPRESS_isProd=true BASE_PATH=/some-path CYPRESS_basePath=/some-path start-server-and-test start-example-build http://localhost:3000/some-path cypress-headless",

This one seems to work fine:

    "e2e-build-headless": "cross-env CYPRESS_isProd=true start-server-and-test start-example-build http://localhost:3000 cypress-headless",

Feel free to try to reproduce cloning this repo: https://github.com/Avansai/next-multilingual

Can run npm run test which will run all the different commands, and if you replace 127.0.0.1 when using Node 18, it will freeze at the 3rd command.

@MikeMcC399
Copy link

@nbouvrette

Could you say which OS you are testing on? localhost can work differently depending on this. I didn't find any workflows on https://github.com/Avansai/next-multilingual (.github/workflows) to give me a hint.

@nbouvrette
Copy link

nbouvrette commented Feb 28, 2023

I'm on macOS 13.2.1

Regarding next-multilingual here would be step-by-step reproductions:

  1. Clone https://github.com/Avansai/next-multilingual
  2. run npm run install
  3. run npm run build
  4. Open package.json and make sure that all the 127.0.0.1 are replaced by localhost
  5. run npm run test

If you check the script for npm run test you will see that there are 4 different subscripts being run with different start-server-and-test steps. The 3rd step will hang, and when I press ctrl-c it sort of resumes but go back into the same stuck step. Those tests can take a few minutes to run before it hangs (there are a lot of tests).

Of course, you need to be on Node >= v18+. It didn't do this when I was on Node 16.

@bahmutov
Copy link
Owner

bahmutov commented Feb 28, 2023 via email

@nbouvrette
Copy link

Sure. How do I turn on verbose logs?

@bahmutov
Copy link
Owner

bahmutov commented Feb 28, 2023 via email

@MikeMcC399
Copy link

@nbouvrette

I'm on macOS 13.2.1

I was hoping to be able to try this out, however on https://github.com/actions/runner-images macos-latest is equivalent to macos-12 so your version is not yet available. I'll be interested if you open a new issue and provide debug logs anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet