n8n-io/n8n · error · Error
Cannot create " ". Only is supported.
Error message
Cannot create "${path}". Only ${supportedPath} is supported. What it means
Path restriction error from the text editor's validateCreatePath. It fires when a create operation targets a path outside the single path configured via options.supportedPath. The text editor instance is sandboxed to one known file, and createInvalidPathMessage can override this default text. Guard against unintended file creation, not a filesystem failure.
Solutions
- Use the single path the tool is configured to support (named in the message).
- Reconfigure the TextEditorTool options (supportedPath) if a different file must be created.
- Write the file at the supported path and reference it from there.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/ai-utilities/src/utils/text-editor.ts:308 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/f613953b6e13e591.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/ai-utilities/src/utils/text-editor.ts:308
setText(text: string): void {
this.text = text;
}
hasText(): boolean {
return this.text !== null;
}
clearText(): void {
this.text = null;
}
private validateCreatePath(path: string): void {
const supportedPath = this.options.supportedPath;
if (supportedPath === undefined || path === supportedPath) {
return;
}
throw new Error(
this.options.createInvalidPathMessage?.(path, supportedPath) ??
`Cannot create "${path}". Only ${supportedPath} is supported.`,
);
}
private validatePath(path: string): void {
const supportedPath = this.options.supportedPath;
if (supportedPath === undefined || path === supportedPath) {
return;
}
throw this.createInvalidPathError(
path,
supportedPath,
this.options.invalidPathMessage?.(path, supportedPath),
);
}
View on GitHub (pinned to 5ac6606e81)