Skip to content

dynamic: node:dns/promises is not shimmed, so node-redis fails on load #434

Closed

Description

@temich

Summary

The island doesn't provide node:dns/promises. node-redis 6 (@redis/client) requires it at the top of lib/client/enterprise-maintenance-manager.js, which lib/client/index.js loads unconditionally. So importing redis fails as soon as the program starts. node:dns itself is shimmed.

Reproduction

With redis 6.2.1:

import { createClient } from 'redis'

const client = createClient({ url: 'redis://127.0.0.1:6379' })
console.log(client.isOpen)
$ node r.ts
false
$ scriptc build r.ts --dynamic -o r && ./r
Uncaught Error: the island does not provide the 'node:dns/promises' builtin

scriptc coverage --dynamic lists it as node:dns/promises not shimmed — lazy trap (@redis/client) and ends with "builds with --dynamic — no remaining blockers". The require is top-level on the package's own import path, though, so the "lazy" trap fires at load, before any user code runs.

Ask

  • Shim node:dns/promises, at least what node:dns already covers (lookup), or
  • have coverage tell a trap that fires at load from one that fires only when a lazy call happens.

Environment

scriptc 0.1.4, Ubuntu 26.04 x86_64, Node 24.21.0.

Activity

  1. added a commit that references this issue on Sep 25, 2026
    ae8a9db
  2. added a commit that references this issue on Sep 26, 2026
    0d05e56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions