Astro Info
Node v20.8.0
System Linux (x64)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Start astro dev and it start on 4321. Start astro dev again and it start on next available port 4322.
Run astro preview and there is error EADDRINUSE: address already in use ::1:4321.
Run node dist/server/entry.mjs and it say [@astrojs/node] Server listening on http://127.0.0.1:4321 even though process already running on 4321.
What's the expected result?
astro preview should open on next available port 4322.
node dist/server/entry.mjs should have error EADDRINUSE: address already in use ::1:4321.
astro preview should have command line option --port and astro config file option to change port to try first.
- node adapter should have host and port options that are used as default if environment variable not given. Not every build process can provide environment variables (https://docs.astro.build/en/guides/integrations-guide/node/#runtime-environment-variables).
adapter: node({
host: "0.0.0.0",
port: "4321"
})
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-1o5lsw
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Start
astro devand it start on 4321. Startastro devagain and it start on next available port 4322.Run
astro previewand there is errorEADDRINUSE: address already in use ::1:4321.Run
node dist/server/entry.mjsand it say[@astrojs/node] Server listening on http://127.0.0.1:4321even though process already running on 4321.What's the expected result?
astro previewshould open on next available port 4322.node dist/server/entry.mjsshould have errorEADDRINUSE: address already in use ::1:4321.astro previewshould have command line option--portand astro config file option to change port to try first.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-1o5lsw
Participation