{"record":{"id":"b76b684487097c50","repo":"denoland/deno","slug":"no-such-module-name","errorCode":null,"errorMessage":"No such module: ${name}","messagePattern":"No such module: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ext/node/polyfills/internal_binding/mod.ts","lineNumber":151,"sourceCode":"  \"tls_wrap\": {},\n  \"trace_events\": {},\n  \"tty_wrap\": ttyWrap,\n  types,\n  \"udp_wrap\": udpWrap,\n  url: {},\n  util,\n  uv,\n  v8: {},\n  worker: {},\n  zlib: {},\n};\n\nexport type BindingName = keyof typeof modules;\n\nexport function getBinding(name: BindingName) {\n  const mod = modules[name];\n  if (!mod) {\n    throw new Error(`No such module: ${name}`);\n  }\n  return mod;\n}\n","sourceCodeStart":133,"sourceCodeEnd":155,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/ext/node/polyfills/internal_binding/mod.ts#L133-L155","documentation":"getBinding(name) backs Deno's internalBinding() polyfill: a fixed table (modules) in ext/node/polyfills/internal_binding/mod.ts maps Node internal binding names to Deno implementations. A name not present in the table throws a plain Error ('No such module: <name>') with no error code — meaning that Node internal binding is not (yet) implemented.","triggerScenarios":"An npm dependency calling internalBinding('<unimplemented-name>'), e.g. bindings added in newer Node releases (sqlite, quic, sea) or version-specific internals; typos in manual internalBinding calls; native addons reaching into internals absent from Deno's compat layer.","commonSituations":"Packages written against a newer Node version than Deno's node-compat supports; CLI tools that probe optional internal bindings; a Deno upgrade changing which modules are registered.","solutions":["Upgrade Deno — the compat table grows every release and the failing binding may be implemented","Avoid the code path or API that needs the binding (often behind a flag or optional feature of the package)","Search denoland/deno issues for the binding name and file one if missing, with the failing package"],"exampleFix":"// before\nconst binding = internalBinding('node_sqlite'); // No such module: node_sqlite\n\n// after\nlet binding;\ntry {\n  binding = internalBinding('node_sqlite');\n} catch {\n  binding = undefined; // fall back to node:sqlite public API or WASM sqlite\n}","handlingStrategy":"try-catch","validationCode":"import { getBinding } from 'node:internal_binding/mod.ts'; // internal only\nconst implemented = (() => { try { getBinding(name); return true; } catch { return false; } })();","typeGuard":null,"tryCatchPattern":"try {\n  binding = internalBinding(name);\n} catch (e: any) {\n  if (/^No such module: /.test(e?.message ?? '')) {\n    binding = undefined; // fall back to public API path\n  } else throw e;\n}","preventionTips":["Never call internalBinding from application code — use the public node: APIs","Pin dependencies known to work under Deno; check the compat table when upgrading Node-targeted deps","Wrap optional-internal-binding probes (feature detection) in try/catch with a public-API fallback"],"tags":["node-compat","internal-binding","module-resolution"],"backgroundTag":"missing-internal-binding","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}