-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
🐛 BUG: unable to find network to expose
when exposing to network with Node 18.1+
#3598
Comments
unable to find network to expose
when exposing to network with Node 18
unable to find network to expose
when exposing to network with Node 18unable to find network to expose
when exposing to network with Node 18.1+
Correcting my bug report to specify that this breaking change is introduced in Node |
@arimgibson I am running node version 18.6.0 and I am not able to expose it to the network. It looks like your fix probably works for node versions 18.1.0 to 18.3.0. I am guessing version 18.4.0 nullifies your changes since they seem to have reverted the family property back to a string like it was in Node 16. For reference: |
@chitowncrispy really good catch! That's frustrating; I'll go PR an amended version now. Thanks for finding that and letting me know! |
@arimgibson No problem. Just as an FYI it looks like the logic you implemented should apply for Node version 18.0.0 as well since that is when Node first introduced the family property as a number. |
Ugh, can't believe I missed that too @chitowncrispy! Updated PR submitted though, thanks again! |
No way, did they change it again 😹 thanks for reporting @anurag-roy , taking a look |
Hmmm, I was unable to replicate this @anurag-roy , though I am on Windows. I noticed that your version of Astro seems to be out of date, current release is If the bug still occurs, it might be something macOS-specific which I would not be able to debug as I don't have access to a Mac. Edit: I downgraded my Astro to the version you're on ( |
@arimgibson Upgrading to |
What version of
astro
are you using?1.0.0-beta.46
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Windows
Describe the Bug
In Node 18.1, a change to the return value of
os.networkInterfaces()
is made, causing Astro to be unable to find a network to host the Astrodev
orpreview
servers on (specific error isunable to find network to expose
). This is because when Astro is checking for valid network interfaces, it looks an interface withfamily: IPv4
, and Node 18.1 uses a simple integer value offamily: 4
.This change can be observed in the official Node documentation for the Node 16 LTS vs the Node 18 LTS. Look under the return object properties...
Node 18
os.networkInterfaces()
Node 16
os.networkInterfaces()
Image example from Node 16
I'll handle the PR; it's a pretty easy one...
Link to Minimal Reproducible Example
N/A
Participation
The text was updated successfully, but these errors were encountered: