deepseek-ai/deepseek-harness · error · FsError
FS_NOT_FOUND
FS_NOT_FOUND
Error message
file_path must be a non-empty string
What it means
Error "file_path must be a non-empty string" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/fs-local/src/fsio.ts:147
/** One local directory child with a resolved target and cheap metadata. */
export interface LocalDirEntry {
name: string
type: 'file' | 'directory' | 'other'
target: LocalTarget
version?: FsVersion
size?: number
}
/**
* Resolve a path to its absolute display path and realpath identity. For a missing target,
* realpath the nearest existing ancestor and append the missing suffix, preserving identity
* across symlinked ancestors before and after creation.
* @param cwd - base directory a relative `path` resolves against.
* @param path - absolute or relative path; empty/whitespace-only throws `FS_NOT_FOUND`.
* @returns the absolute display path plus the realpath-derived stable target key.
*/
export async function resolveLocalTarget(cwd: string, path: string): Promise<LocalTarget> {
if (path.trim().length === 0) throw new FsError('file_path must be a non-empty string', 'FS_NOT_FOUND')
const displayPath = resolve(cwd, path)
try {
// Prefer the file's own realpath (resolves a symlinked file to its target).
return { displayPath, targetKey: FsTargetKey(await realpath(displayPath)) }
} catch (error: unknown) {
// A path component is a file, not a directory (e.g. "afile/child.txt" where
// "afile" is a regular file): the target can neither exist nor be created,
// so surface the structured taxonomy instead of a raw Node ENOTDIR.
/* v8 ignore next -- Windows reports this case as ENOENT and repairs it in the ancestor walk below. */
if (isENOTDIR(error)) throw new FsError(`cannot resolve "${displayPath}": a parent path segment is not a directory`, 'FS_NOT_FOUND')
/* v8 ignore next -- non-ENOENT realpath failure needs a permission/IO fault; ENOENT falls through to ancestor resolution. */
if (!isENOENT(error)) throw error
}
// File absent: realpath the nearest existing ancestor and re-append the
// missing suffix (the file basename plus any not-yet-created intermediate
// dirs), so the key is stable across creation of those dirs.
const missing = [basename(displayPath)]
let ancestor = dirname(displayPath)View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/fs/fs-local/src/fsio.ts:147 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/80748879da358fa5.
Report an issue: GitHub.