deepseek-ai/deepseek-harness · error · Error

workspace root " " cannot be resolved

Error message

workspace root "${workspaceRoot}" cannot be resolved: ${messageOf(error)}

What it means

canonicalizeWorkspace wraps a failure from fs.resolve: the caller-supplied workspace root path could not be resolved to a filesystem target (missing path, permission, provider error). The original error is attached as cause.

Solutions

  1. Fix the workspaceRoot path per the included OS error (existence and permissions).
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/lsp/lsp-stdio/src/host.ts:43 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/5e2bc43d63b87e19. Report an issue: GitHub.

Appendix: source

Thrown at packages/lsp/lsp-stdio/src/host.ts:43

/**
 * Resolve and validate one workspace through `ctx.fs`.
 * @param fs - filesystem provider sharing the language server's execution world.
 * @param workspaceRoot - caller-supplied workspace path.
 * @param signal - optional cancellation around provider operations.
 * @returns stable identity plus process path and file URI.
 */
export async function canonicalizeWorkspace(
  fs: FileSystem,
  workspaceRoot: string,
  signal?: AbortSignal,
): Promise<HostWorkspace> {
  throwIfAborted(signal)
  let target: FsTarget
  try {
    target = await fs.resolve(workspaceRoot, signal === undefined ? {} : { signal })
  } catch (error: unknown) {
    throwIfAborted(signal)
    throw new Error(`workspace root "${workspaceRoot}" cannot be resolved: ${messageOf(error)}`, { cause: error })
  }
  throwIfAborted(signal)
  const info = await fs.stat(target, signal).catch((error: unknown) => {
    throwIfAborted(signal)
    throw error
  })
  throwIfAborted(signal)
  if (info?.type !== 'directory') {
    throw new Error(`workspace root "${workspaceRoot}" is not a directory`)
  }
  return {
    target,
    canonicalPath: fs.processPath(target),
    fileUrl: fs.fileUrl(target),
  }
}

/**

View on GitHub (pinned to b150a551b8)