{"record":{"id":"04940431c70d2b62","repo":"remotion-dev/remotion","slug":"please-specify-at-least-one-package-name-example","errorCode":null,"errorMessage":"Please specify at least one package name. Example: npx remotion add @remotion/transitions","messagePattern":"Please specify at least one package name\\. Example: npx remotion add @remotion/transitions","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":131,"sourceCode":"\t\t\tffmpegCommand(process.argv.slice(3), logLevel);\n\t\t} else if (command === 'gpu') {\n\t\t\tawait gpuCommand(logLevel);\n\t\t} else if (command === 'ffprobe') {\n\t\t\tffprobeCommand(process.argv.slice(3), logLevel);\n\t\t} else if (command === 'upgrade') {\n\t\t\tawait upgradeCommand({\n\t\t\t\tremotionRoot,\n\t\t\t\tpackageManager: packageManager ?? undefined,\n\t\t\t\tversion:\n\t\t\t\t\tversionFlagOption.getValue({commandLine: parsedCli}).value ??\n\t\t\t\t\tundefined,\n\t\t\t\tskipSkills: skipSkillsOption.getValue({commandLine: parsedCli}).value,\n\t\t\t\tlogLevel,\n\t\t\t\targs,\n\t\t\t});\n\t\t} else if (command === 'add') {\n\t\t\tif (args.length === 0) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Please specify at least one package name. Example: npx remotion add @remotion/transitions',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Find where additional flags start (arguments starting with -)\n\t\t\tconst flagIndex = args.findIndex((arg) => arg.startsWith('-'));\n\t\t\tconst packageNames = flagIndex === -1 ? args : args.slice(0, flagIndex);\n\t\t\tconst additionalArgs = flagIndex === -1 ? [] : args.slice(flagIndex);\n\n\t\t\tawait addCommand({\n\t\t\t\tremotionRoot,\n\t\t\t\tpackageManager: packageManager ?? undefined,\n\t\t\t\tpackageNames,\n\t\t\t\tlogLevel,\n\t\t\t\targs: additionalArgs,\n\t\t\t});\n\t\t} else if (command === 'skills') {\n\t\t\tawait skillsCommand(args, logLevel, {","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/index.ts#L113-L149","documentation":"Thrown by the `remotion add` subcommand when no positional package arguments were supplied. The add command installs additional @remotion/* packages into the current project and requires at least one package name to operate on.","triggerScenarios":"Running `npx remotion add` with no arguments, or only flags (e.g. `remotion add --help` style invocation that still reaches this branch).","commonSituations":"Forgetting the package name; assuming `add` with no args lists available packages; copy-paste truncation of a command.","solutions":["Provide one or more package names: `npx remotion add @remotion/transitions @remotion/shapes`.","If unsure which packages exist, browse https://remotion.dev/docs or run `npx remotion add @remotion/<tab>` completion."],"exampleFix":"// before\n$ npx remotion add\n// after\n$ npx remotion add @remotion/transitions","handlingStrategy":"validation","validationCode":"const validateAddArgs = (args: string[]) => {\n  const packageNames = args.filter((a) => !a.startsWith('-'));\n  if (packageNames.length === 0) {\n    throw new Error('Pass at least one package name to `remotion add`, e.g. @remotion/transitions');\n  }\n  return packageNames;\n};\n\nvalidateAddArgs(process.argv.slice(2));","typeGuard":"const hasPackageName = (args: string[]): boolean =>\n  args.some((a) => !a.startsWith('-'));","tryCatchPattern":null,"preventionTips":["Wrap `remotion add` invocations in a script that asserts the package list is non-empty.","Document the expected package names in onboarding docs."],"tags":["cli","add-command","packages","usage"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}