getIp dies
mzedeler opened this issue ยท 3 comments
mzedeler commented
When I run esbuild serve with the -w
parameter, it dies with this error:
11:55 $ node esbuild.config.mjs -w
[watch] build finished, watching for changes...
Serving ๐
Local โ http://localhost:3000
file:///home/mike/workspace/teamway-test/node_modules/create-serve/src/utils/getIp.js:6
.find(ip => ip.family == 'IPv4' && !ip.internal).address;
^
It seems that there is some assumption in getIp
that doesn't hold (ip.family
is numeric on my machine).
Node vesion: 18.
Ubuntu version: 22.
mzedeler commented
It looks like a bug, because according to the documentation, networkInterfaces
only returns numeric 4
or 6
. I can provide a PR to fix it.
pask2 commented
Hi, I'm having this issue currently. @mzedeler did you have a good fix? If so, could you put up a PR?
pask2 commented
Actually, this looks like an issue in nativew/serve. Also here is the issue/PR that resolves it.