deepseek-ai/deepseek-harness · error · TypeError

typert-protocol: cannot mark Remote method "${method}" on an

Error message

typert-protocol: cannot mark Remote method "${method}" on an object without a prototype

What it means

Error "typert-protocol: cannot mark Remote method "${method}" on an object without a prototype" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/typert/protocol/src/index.ts:242

export function remoteMethods(service: object): readonly RemoteMethodMarker[] {
  const prototype = Object.getPrototypeOf(service) as object | null
  if (prototype === null) return []
  return [...(markers.get(prototype) ?? [])].map(([method, marker]) => ({ method, ...marker }))
}

function addMarkerInitializer<This extends object>(
  context: RemoteInitializerContext<This>,
  invocation: RemoteInvocationMarker,
  exportName?: string,
): void {
  if (context.private || context.static || typeof context.name !== 'string') {
    throw new TypeError('typert-protocol: Remote decorators require a public instance method with a string name')
  }
  const method = context.name
  context.addInitializer(function (this: This) {
    const prototype = Object.getPrototypeOf(this) as object | null
    if (prototype === null) {
      throw new TypeError(`typert-protocol: cannot mark Remote method "${method}" on an object without a prototype`)
    }
    mark(prototype, method, invocation, exportName)
  })
}

function mark(
  prototype: object,
  method: string,
  invocation: RemoteInvocationMarker,
  exportName?: string,
): void {
  let table = markers.get(prototype)
  if (table === undefined) {
    table = new Map()
    markers.set(prototype, table)
  }
  const marker: StoredRemoteMethodMarker = {
    ...(exportName === undefined || exportName === method ? {} : { exportName }),

View on GitHub (pinned to b150a551b8)

Solutions

  1. Apply Remote methods on prototype-based classes, not prototype-less objects.

When it happens

Trigger: Thrown at packages/typert/protocol/src/index.ts:242 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/e6f057a210236425. Report an issue: GitHub.