deepseek-ai/deepseek-harness · error · Error

client half failed to parse in this browser: ${error.message

Error message

client half failed to parse in this browser: ${error.message}
The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.

What it means

Error "client half failed to parse in this browser: ${error.message} The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement." thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:186

  clientCode: string,
  env: DynamicCordisClosureEnv,
  styles: DynamicCordisStyles,
): Promise<DynamicCordisEvaluatedPlugin | ((ctx: unknown) => unknown)> {
  const traps = closureTraps()
  const parameters = ['React', 'console', 'styles', 'host', 'harness', ...Object.keys(traps), 'process', 'Buffer']
  let closure: (...args: unknown[]) => Promise<unknown>
  try {
    // The wrapper mirrors the host precheck exactly, so line offsets match.
    // Evaluating a definition's browser half IS this package's product: the
    // source arrived from a host process that accepted and prechecked it.
    // oxlint-disable-next-line typescript/no-implied-eval -- see above
    const factory = new Function(...parameters, `return (async () => {\n${clientCode}\n})()`)
    closure = factory as (...args: unknown[]) => Promise<unknown>
  } catch (error) {
    if (!(error instanceof SyntaxError)) throw error
    // Engine-divergence fallback: the host precheck already carried the
    // line/caret teaching; browsers give only the message.
    throw new Error(
      `client half failed to parse in this browser: ${error.message}\n`
      + 'The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.',
    )
  }
  const host = {
    /**
     * Call a host-half handler of THIS package (harness.handle pairing). A call
     * with nothing to pass omits the argument: it arrives at the handler as
     * `null`, because the wire carries JSON and `undefined` is not JSON —
     * requiring `host.call('m', {})` would be a ritual, and defaulting to `{}`
     * would invent an empty argument the caller never wrote.
     */
    call: (method: string, args: unknown = null): Promise<unknown> => env.invoke(method, args),
  }
  const returned = await closure(
    React,
    taggedConsole(pluginId, (message) => { env.noteError(message) }),
    styles,

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:186 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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