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

Node 18 family parameter fails when passing url #1672

Closed
ksmithut opened this issue Nov 2, 2022 · 2 comments · Fixed by #1673
Closed

Node 18 family parameter fails when passing url #1672

ksmithut opened this issue Nov 2, 2022 · 2 comments · Fixed by #1673

Comments

@ksmithut
Copy link
Contributor

ksmithut commented Nov 2, 2022

The following example fails in node 18

import Redis from 'ioredis'

new Redis('redis://localhost:6379?family=6')
[ioredis] Unhandled error event: TypeError [ERR_INVALID_ARG_VALUE]: The property 'options.family' must be one of: 0, 4, 6. Received '6'
    at lookup (node:dns:179:11)
    at node:net:1170:5
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:466:18)
    at lookupAndConnect (node:net:1169:3)
    at Socket.connect (node:net:1097:5)
    at Object.connect (node:net:219:17)
    at .../node_modules/ioredis/built/connectors/StandaloneConnector.js:58:45
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

This is because node 18 stopped type coercing the family value. nodejs/node#41431

I'll attempt to submit a PR for this.

@ksmithut
Copy link
Contributor Author

ksmithut commented Nov 2, 2022

PR submitted: #1673

@luin luin closed this as completed in #1673 Nov 2, 2022
@ksmithut
Copy link
Contributor Author

ksmithut commented Nov 2, 2022

@luin Thanks for the quick turnaround 🍺

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

Successfully merging a pull request may close this issue.

1 participant