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

wait-on hangs #116

Closed
MassMessage opened this issue Feb 16, 2022 · 6 comments
Closed

wait-on hangs #116

MassMessage opened this issue Feb 16, 2022 · 6 comments

Comments

@MassMessage
Copy link

I have a script like this:

"scripts": {
   "start": "set PORT=3004 && react-scripts --openssl-legacy-provider start",
   "make": "electron-forge make",
   "build": "react-scripts build",
   "test": "react-scripts test",
   "eject": "react-scripts eject",
   "dev": "concurrently -k \"cross-env BROWSER=none npm start\" \"npm:electron\"",
   "electron": "wait-on tcp:3004 && electron ."
 }

running yarn start and yarn electron independly does work fine but running yarn start, waiting for the page to open then running in other shell: yarn wait-on tcp:3004 && calc hangs even albeit http://localhost:3004 is opened in the browser (from the previous yarn start run). I didn't get any error. It just hangs. How can I fix that?

@TheRealLorenz
Copy link

Could you paste the output of yarn wait-on -v tcp:3004 && calc ?

@MassMessage
Copy link
Author

Could you paste the output of yarn wait-on -v tcp:3004 && calc ?

hangs too. What I eneded up doing was set the HOST=127.0.0.1 PORT=3004 in .env file then wait-on wait-on http://127.0.0.1:3004/ was back working.

@TheRealLorenz
Copy link

Could you paste the output of yarn wait-on -v tcp:3004 && calc ?

hangs too. What I eneded up doing was set the HOST=127.0.0.1 PORT=3004 in .env file then wait-on wait-on http://127.0.0.1:3004/ was back working.

Yeah I solved it in the same way. This is a duplicate of #109 and #79

@MassMessage
Copy link
Author

Could you paste the output of yarn wait-on -v tcp:3004 && calc ?

hangs too. What I eneded up doing was set the HOST=127.0.0.1 PORT=3004 in .env file then wait-on wait-on http://127.0.0.1:3004/ was back working.

Yeah I solved it in the same way. This is a duplicate of #109 and #79

sorry, I didn't find any of those before opening an issue. This one can be closed too

@TheCodeHeist
Copy link

Oh wow,
I just solved it by replacing wait-on http://localhost:3000/ && <NEXT_CMD> with wait-on http://127.0.0.1:3000/ && <NEXT_CMD>, and nothing else was needed to do...

noriyotcp added a commit to noriyotcp/fragmemo that referenced this issue Apr 23, 2022
Replace tcp:3000 with tcp:127.0.0.1:3000

jeffbski/wait-on#79
jeffbski/wait-on#116

Vite server.host is '127.0.0.1' by default
https://vitejs.dev/config/#server-host
@yuzhen1024
Copy link

I wait-on http://localhost:3000 hangs, but wait-on http://127.0.0.1:3000 is fine.

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

No branches or pull requests

4 participants