{"record":{"id":"9f67f81c11c205d6","repo":"denoland/deno","slug":"err-not-implemented","errorCode":"ERR_NOT_IMPLEMENTED","errorMessage":"Not implemented: ${msg}","messagePattern":"Not implemented: (.+?)","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ext/node/polyfills/_utils.ts","lineNumber":46,"sourceCode":"\ntype BinaryEncodings = \"binary\";\n\ntype TextEncodings =\n  | \"ascii\"\n  | \"utf8\"\n  | \"utf-8\"\n  | \"utf16le\"\n  | \"ucs2\"\n  | \"ucs-2\"\n  | \"base64\"\n  | \"base64url\"\n  | \"latin1\"\n  | \"hex\";\n\ntype Encodings = BinaryEncodings | TextEncodings;\n\nfunction notImplemented(msg: string): never {\n  throw new ERR_NOT_IMPLEMENTED(msg);\n}\n\nfunction warnNotImplemented(msg?: string) {\n  const message = msg\n    ? `Warning: Not implemented: ${msg}`\n    : \"Warning: Not implemented\";\n  // deno-lint-ignore no-console\n  console.warn(message);\n}\n\ntype _TextDecoder = typeof TextDecoder.prototype;\nconst _TextDecoder = TextDecoder;\n\ntype _TextEncoder = typeof TextEncoder.prototype;\nconst _TextEncoder = TextEncoder;\n\n// API helpers\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/ext/node/polyfills/_utils.ts#L28-L64","documentation":"Deno's ext/node polyfills stub out Node APIs that are not yet implemented using notImplemented(msg), which throws ERR_NOT_IMPLEMENTED naming the missing feature (the message is `Not implemented: ${msg}`). The module still imports successfully and the API surface exists, so the failure surfaces at call time rather than load time — Deno's standard signal that a node: API is recognized but not built yet.","triggerScenarios":"Calling any polyfilled-but-stubbed node: API from Deno's ext/node — the message names the exact feature; typically little-used corners of node:crypto, process internals, or modules npm packages reach indirectly.","commonSituations":"Running npm packages under Deno that exercise Node internals not yet covered; code that works on Node failing at one specific call on Deno; upgrading or downgrading Deno changing coverage.","solutions":["Read the message to identify the exact unimplemented API and check for a standard-web or Deno-native equivalent","Update Deno — ext/node coverage grows every release and the call may now work","Isolate the feature behind an interface so Deno uses an alternative implementation or run that path on Node","Feature-detect and fall back: wrap the call and degrade gracefully when it throws ERR_NOT_IMPLEMENTED"],"exampleFix":"// before\nimport diagnostics_channel from 'node:diagnostics_channel';\ndiagnostics_channel.subscribe('http', handler); // may throw ERR_NOT_IMPLEMENTED in Deno\n\n// after\nimport diagnostics_channel from 'node:diagnostics_channel';\ntry {\n  diagnostics_channel.subscribe('http', handler);\n} catch (err) {\n  if ((err as NodeJS.ErrnoException).code === 'ERR_NOT_IMPLEMENTED') {\n    // fallback tracing, e.g. a no-op collector\n  } else throw err;\n}","handlingStrategy":"fallback","validationCode":"function callIfImplemented<T extends (...args: never[]) => unknown>(\n  fn: T | undefined,\n  ...args: Parameters<T>\n): void {\n  try {\n    fn?.(...args);\n  } catch (err) {\n    if ((err as NodeJS.ErrnoException).code !== 'ERR_NOT_IMPLEMENTED') throw err;\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  result = nodeApi(input);\n} catch (err) {\n  if ((err as NodeJS.ErrnoException).code === 'ERR_NOT_IMPLEMENTED') {\n    result = webOrDenoAlternative(input); // standard-web or Deno-native equivalent\n  } else throw err;\n}","preventionTips":["Wrap rarely-used node: APIs in a thin adapter layer so Deno fallbacks live in one place","Smoke-test the full request path under Deno in CI, not just under Node","Keep Deno updated; check the release notes for ext/node coverage improvements"],"tags":["node-compat","deno","polyfill","unsupported-feature"],"backgroundTag":"polyfill-not-implemented","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}