Skip to content

Commit

Permalink
fix: check node version and find acceptable host accordingly (withast…
Browse files Browse the repository at this point in the history
  • Loading branch information
arimgibson authored Jun 15, 2022
1 parent e60b4a0 commit e3a8a5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit e3a8a5f

Please sign in to comment.