{"record":{"id":"2f44ec8af1ba4b5d","repo":"denoland/deno","slug":"warning-not-implemented-msg","errorCode":null,"errorMessage":"Warning: Not implemented: ${msg}","messagePattern":"Warning: Not implemented: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"ext/node/polyfills/_utils.ts","lineNumber":54,"sourceCode":"  | \"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\ntype MaybeNull<T> = T | null;\ntype MaybeDefined<T> = T | undefined;\ntype MaybeEmpty<T> = T | null | undefined;\n\nfunction intoCallbackAPI<T>(\n  // deno-lint-ignore no-explicit-any\n  func: (...args: any[]) => Promise<T>,\n  cb: MaybeEmpty<(err: MaybeNull<Error>, value?: MaybeEmpty<T>) => void>,","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/ext/node/polyfills/_utils.ts#L36-L72","documentation":"Deno's node-compat layer ships some Node APIs as warning stubs: calling them runs warnNotImplemented(msg) in ext/node/polyfills/_utils.ts, which prints this message and returns instead of throwing. The named API exists for import compatibility but does nothing under Deno. Your code continues running with silently missing behavior.","triggerScenarios":"Application or dependency code invokes a node: API whose polyfill is a warn-stub, passing its name as msg (the string is whatever the polyfill supplies, e.g., a module or method name). Typical spots are less-ported surfaces like process.report, some tls/v8/worker options, and niche stream hooks.","commonSituations":"Running npm CLIs or SDKs under deno run/deno compile that touch uncommon Node APIs; libraries that feature-detect with typeof checks (the stub is a function, so detection passes) and then call into nothing; upgrading a dependency that starts using a newly referenced Node API.","solutions":["Identify the API named in the message and check Deno's node-compat issue tracker for its implementation status","Replace the call with a supported equivalent: a Deno-native API or another implemented node: module path","Upgrade Deno, since node coverage expands every release","If the caller is third-party and unfixable, isolate it in a subprocess/worker where the no-op is harmless, and verify the feature it guards is not needed"],"exampleFix":"// before\nimport process from \"node:process\";\nprocess.report?.writeReport(\"./report.json\"); // Warning: Not implemented: ...\n\n// after: use the supported native path for the same goal\n// e.g. diagnostics via deno CLI flags instead:\n//   deno run --v8-flags=--dump-counters app.js\n// or gate the call on a known-good Deno version and skip it otherwise","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"// gate node APIs with known-stubbed surfaces on a Deno version check\nfunction nodeApiLikelyImplemented(minDeno: string): boolean {\n  const cur = Deno.version.deno.split(\".\").map(Number);\n  const min = minDeno.split(\".\").map(Number);\n  return cur[0] > min[0] || (cur[0] === min[0] && cur[1] >= min[1]);\n}\n// e.g. only call the node API when nodeApiLikelyImplemented(\"2.3.0\")","tryCatchPattern":null,"preventionTips":["Check Deno's node-compat docs/issues before adopting an uncommon node: API in shared code","typeof checks cannot detect warn-stubs — the stub is a real function; version-gate instead","Watch stderr for 'Warning: Not implemented' in CI smoke tests and treat it as a failing signal","Prefer Deno-native or long-implemented node: modules in library code"],"tags":["node-compat","polyfill","not-implemented","silent-noop"],"backgroundTag":"api-not-implemented","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"}