denoland/deno · warning

Warning: Not implemented

Error message

Warning: Not implemented

What it means

The msg-less form of warnNotImplemented() in ext/node/polyfills/_utils.ts: a node-compat stub was invoked without labeling which API it stubs, so the log only says 'Warning: Not implemented' with no name. Behavior is the same as the labeled variant: the call is a no-op and execution continues. The missing label makes it harder to trace which call site triggered it.

Source

Thrown at ext/node/polyfills/_utils.ts:54

  | "ucs2"
  | "ucs-2"
  | "base64"
  | "base64url"
  | "latin1"
  | "hex";

type Encodings = BinaryEncodings | TextEncodings;

function notImplemented(msg: string): never {
  throw new ERR_NOT_IMPLEMENTED(msg);
}

function warnNotImplemented(msg?: string) {
  const message = msg
    ? `Warning: Not implemented: ${msg}`
    : "Warning: Not implemented";
  // deno-lint-ignore no-console
  console.warn(message);
}

type _TextDecoder = typeof TextDecoder.prototype;
const _TextDecoder = TextDecoder;

type _TextEncoder = typeof TextEncoder.prototype;
const _TextEncoder = TextEncoder;

// API helpers

type MaybeNull<T> = T | null;
type MaybeDefined<T> = T | undefined;
type MaybeEmpty<T> = T | null | undefined;

function intoCallbackAPI<T>(
  // deno-lint-ignore no-explicit-any
  func: (...args: any[]) => Promise<T>,
  cb: MaybeEmpty<(err: MaybeNull<Error>, value?: MaybeEmpty<T>) => void>,

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. Trap console.warn temporarily to capture a stack trace at the exact call site (see validation code) and identify the invoking module
  2. Reproduce with `deno run` and bisect your imports/request paths until the warning appears, then replace that call with a supported API
  3. Upgrade Deno; many stubs gain real implementations, and newer polyfills label their warnings
  4. Report the unlabeled stub to the Deno repo so the message can carry the API name

Example fix

// before: anonymous warning in logs, unknown origin
// Warning: Not implemented

// after: instrument once at startup to attribute it
const warn = console.warn.bind(console);
console.warn = (...a) => {
  if (String(a[0]) === "Warning: Not implemented") console.trace("unimplemented node API");
  warn(...a);
};
Defensive patterns

Strategy: validation

Validate before calling

// attribute the anonymous warning: install this trap before importing app code
const warn = console.warn.bind(console);
console.warn = (...a) => {
  if (String(a[0]).startsWith("Warning: Not implemented")) {
    console.trace("unimplemented node API hit"); // stack names the call site
  }
  warn(...a);
};

Prevention

When it happens

Trigger: A polyfill calls warnNotImplemented() with no argument, so any invocation of that unnamed stub prints the bare message. Because nothing identifies the API, it surfaces as an unattributable warning during normal execution of node-targeting code.

Common situations: Dependencies that lazily touch an unimplemented node API deep inside a rarely-taken branch; production logs full of anonymous 'Not implemented' lines nobody can map to a call; intermittent appearance tied to specific request types.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/d638a494c480812c. Report an issue: GitHub.