{"record":{"id":"f613953b6e13e591","repo":"n8n-io/n8n","slug":"cannot-create-path-only-supportedpath-is","errorCode":null,"errorMessage":"Cannot create \"${path}\". Only ${supportedPath} is supported.","messagePattern":"Cannot create \"(.+?)\"\\. Only (.+?) is supported\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-utilities/src/utils/text-editor.ts","lineNumber":308,"sourceCode":"\tsetText(text: string): void {\n\t\tthis.text = text;\n\t}\n\n\thasText(): boolean {\n\t\treturn this.text !== null;\n\t}\n\n\tclearText(): void {\n\t\tthis.text = null;\n\t}\n\n\tprivate validateCreatePath(path: string): void {\n\t\tconst supportedPath = this.options.supportedPath;\n\t\tif (supportedPath === undefined || path === supportedPath) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new Error(\n\t\t\tthis.options.createInvalidPathMessage?.(path, supportedPath) ??\n\t\t\t\t`Cannot create \"${path}\". Only ${supportedPath} is supported.`,\n\t\t);\n\t}\n\n\tprivate validatePath(path: string): void {\n\t\tconst supportedPath = this.options.supportedPath;\n\t\tif (supportedPath === undefined || path === supportedPath) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow this.createInvalidPathError(\n\t\t\tpath,\n\t\t\tsupportedPath,\n\t\t\tthis.options.invalidPathMessage?.(path, supportedPath),\n\t\t);\n\t}\n","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-utilities/src/utils/text-editor.ts#L290-L326","documentation":"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.","triggerScenarios":"Thrown at packages/@n8n/ai-utilities/src/utils/text-editor.ts:308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}