{"record":{"id":"a0a4ad5a7b361463","repo":"n8n-io/n8n","slug":"flagname-must-contain-at-least-one-property-nam","errorCode":null,"errorMessage":"${flagName} must contain at least one property name.","messagePattern":"(.+?) must contain at least one property name\\.","errorType":"exception","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/import/credentials.ts","lineNumber":402,"sourceCode":"\n\t\t\t\treturn filteredCredential;\n\t\t\t}),\n\t\t);\n\t}\n\n\tprivate parseCredentialProperties(\n\t\tvalue: string | undefined,\n\t\tflagName: '--include' | '--exclude',\n\t) {\n\t\tif (!value) return undefined;\n\n\t\tconst propertyCandidates = value.split(',');\n\t\tconst trimmedProperties = propertyCandidates.map((property) => property.trim());\n\t\tconst nonEmptyProperties = trimmedProperties.filter(Boolean);\n\t\tconst uniqueProperties = Array.from(new Set(nonEmptyProperties));\n\n\t\tif (uniqueProperties.length === 0) {\n\t\t\tthrow new UserError(`${flagName} must contain at least one property name.`);\n\t\t}\n\n\t\treturn uniqueProperties;\n\t}\n\n\tprivate warnOnUnknownProperties(\n\t\tproperties: string[] | undefined,\n\t\tknownProperties: Set<string>,\n\t\tflagName: '--include' | '--exclude',\n\t) {\n\t\tif (!properties?.length) return;\n\n\t\tconst unknownProperties = properties.filter((property) => !knownProperties.has(property));\n\t\tif (unknownProperties.length === 0) return;\n\n\t\tthis.logger.warn(\n\t\t\t`Ignoring unknown properties from ${flagName}: ${unknownProperties.join(', ')}`,\n\t\t);","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/cli/src/commands/import/credentials.ts#L384-L420","documentation":"Thrown by parseCredentialProperties when `--include` or `--exclude` is passed but, after splitting on commas and trimming, no non-empty property names remain. e.g. `--include=,,,` or `--include=,, , `.","triggerScenarios":"`n8n import:credentials --input=f.json --include=,,,` or `--exclude=\" \"`. The split+trim+filter(Boolean) pipeline at credentials.ts:396-398 yields an empty array.","commonSituations":"Whitespace-only flag value; trailing commas; copy-paste from a templated command with placeholder commas.","solutions":["Provide at least one valid property name: `--include=id,name,data`.","Drop the flag entirely if you don't want to filter properties."],"exampleFix":"// before\nn8n import:credentials --input=f.json --include=,,\n// after\nn8n import:credentials --input=f.json --include=id,name","handlingStrategy":"validation","validationCode":"function parseFlag(value: string | undefined, name: string): string[] | undefined {\n  if (!value) return undefined;\n  const unique = Array.from(new Set(value.split(',').map(s => s.trim()).filter(Boolean)));\n  if (unique.length === 0) throw new Error(`${name} needs at least one property name`);\n  return unique;\n}\nconst include = parseFlag(flags.include, '--include');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Trim and de-duplicate property lists before passing to --include/--exclude.","Avoid placeholder commas in templated commands."],"tags":["cli","import","credentials","flags","validation","user-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}