deepseek-ai/deepseek-harness · error · FsError
FS_NOT_REGULAR_FILE
FS_NOT_REGULAR_FILE
Error message
The path ${target.displayPath} is a directory and only the `view` command can be used on directories What it means
Error "The path ${target.displayPath} is a directory and only the `view` command can be used on directories" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/tool-str-replace-editor/src/index.ts:115
return ctx.fs.resolve(path, { signal })
}
async function statExisting(
ctx: Context,
target: FsTarget,
command: 'view' | 'str_replace' | 'insert',
exec: ToolRunContext,
): Promise<FsInfo> {
const info = await ctx.fs.stat(target, exec.signal)
if (info === undefined) {
ctx.emit('fs/observed', target, { kind: 'absent' }, exec)
throw new FsError(
`The path ${target.displayPath} does not exist. Please provide a valid path.`,
'FS_NOT_FOUND',
)
}
if (info.type === 'directory' && command !== 'view') {
throw new FsError(
`The path ${target.displayPath} is a directory and only the \`view\` command can be used on directories`,
'FS_NOT_REGULAR_FILE',
)
}
return info
}
function requiredForCommand(
value: string | undefined,
parameter: string,
command: string,
allowEmpty = true,
): string {
if (value === undefined) throw new Error(`Parameter \`${parameter}\` is required for command: ${command}`)
if (!allowEmpty && value.length === 0) {
throw new Error(`Parameter \`${parameter}\` is empty for command: ${command}`)
}
return valueView on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/fs/tool-str-replace-editor/src/index.ts:115 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/63a67f05953c6d21.
Report an issue: GitHub.