diff --git a/.changeset/kind-feet-double.md b/.changeset/kind-feet-double.md new file mode 100644 index 000000000000..13722f713d21 --- /dev/null +++ b/.changeset/kind-feet-double.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix: find a hosting network differently based on Node version diff --git a/packages/astro/src/core/messages.ts b/packages/astro/src/core/messages.ts index 05b363c4bb09..7da96d696176 100644 --- a/packages/astro/src/core/messages.ts +++ b/packages/astro/src/core/messages.ts @@ -86,7 +86,9 @@ export function devStart({ const ipv4Networks = Object.values(os.networkInterfaces()) .flatMap((networkInterface) => networkInterface ?? []) .filter( - (networkInterface) => networkInterface?.address && networkInterface?.family === 'IPv4' + (networkInterface) => + networkInterface?.address && + networkInterface?.family === (Number(process.version.substring(1, 5)) < 18.1 ? 'IPv4' : 4) ); for (let { address } of ipv4Networks) { if (address.includes('127.0.0.1')) {