Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels