Skip to content
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

ip node module in node 18, TypeError: details.family.toLowerCase is not a function #2

Open
1 task
hufeng opened this issue Apr 26, 2022 · 0 comments
Open
1 task

Comments

@hufeng
Copy link
Owner

hufeng commented Apr 26, 2022

source code

const ip = require('ip')

console.log(ip.address())

node version

$ node -v
v18.0.0

result

/private/tmp/t/node_modules/.pnpm/[email protected]/node_modules/ip/lib/ip.js:386
details.family = details.family.toLowerCase();
^

TypeError: details.family.toLowerCase is not a function
at /private/tmp/t/node_modules/.pnpm/[email protected]/node_modules/ip/lib/ip.js:386:39
at Array.filter ()
at /private/tmp/t/node_modules/.pnpm/[email protected]/node_modules/ip/lib/ip.js:384:37
at Array.map ()
at ip.address (/private/tmp/t/node_modules/.pnpm/[email protected]/node_modules/ip/lib/ip.js:379:37)
at Object. (/private/tmp/t/test.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Module._load (node:internal/modules/cjs/loader:827:12)

current status

Upstream already has a pr
indutny/node-ip#114

TODO

  • Follow up with upstream pr, pending issue resolution, ci support node18
@hufeng hufeng changed the title ip模块在node 18上报错,获取的family字段为数字,转换小写字母报错 ip node module in node 18, TypeError: details.family.toLowerCase is not a function Apr 26, 2022
hufeng pushed a commit that referenced this issue Jan 11, 2023
hufeng pushed a commit that referenced this issue Sep 19, 2023
merge change from dubbo-js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant