{"record":{"id":"c82a4fc014f006ff","repo":"remotion-dev/remotion","slug":"the-following-packages-are-not-remotion-packages","errorCode":null,"errorMessage":"The following packages are not Remotion packages: ${invalidPackages.join(', ')}. Must be one of the Remotion packages or one of the supported extra packages: ${Object.keys(EXTRA_PACKAGES).join(', ')}.","messagePattern":"The following packages are not Remotion packages: (.+?)\\. Must be one of the Remotion packages or one of the supported extra packages: (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/add.ts","lineNumber":43,"sourceCode":"export const addCommand = async ({\n\tremotionRoot,\n\tpackageManager,\n\tpackageNames,\n\tlogLevel,\n\targs,\n}: {\n\tremotionRoot: string;\n\tpackageManager: string | undefined;\n\tpackageNames: string[];\n\tlogLevel: LogLevel;\n\targs: string[];\n}) => {\n\t// Validate that all package names are Remotion packages\n\tconst invalidPackages = packageNames.filter(\n\t\t(pkg) => !listOfRemotionPackages.includes(pkg) && !EXTRA_PACKAGES[pkg],\n\t);\n\tif (invalidPackages.length > 0) {\n\t\tthrow new Error(\n\t\t\t`The following packages are not Remotion packages: ${invalidPackages.join(', ')}. Must be one of the Remotion packages or one of the supported extra packages: ${Object.keys(EXTRA_PACKAGES).join(', ')}.`,\n\t\t);\n\t}\n\n\tconst {\n\t\tdependencies,\n\t\tdevDependencies,\n\t\toptionalDependencies,\n\t\tpeerDependencies,\n\t} = StudioServerInternals.getInstalledDependencies(remotionRoot);\n\n\t// Check if packages are already installed\n\tconst allDeps = [\n\t\t...dependencies,\n\t\t...devDependencies,\n\t\t...optionalDependencies,\n\t\t...peerDependencies,\n\t];","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/add.ts#L25-L61","documentation":"`addCommand` filters the requested package names against `listOfRemotionPackages` and the `EXTRA_PACKAGES` map. Any name in neither set is collected into `invalidPackages`, and if any exist, the command aborts listing both the invalid names and the supported extra packages. This prevents installing arbitrary/typo'd package names under the Remotion installer.","triggerScenarios":"Running `npx remotion add <pkg>` with a package name that is not a Remotion package and not in EXTRA_PACKAGES; typos like '@remotion/shape' (missing 's'); requesting a package that was renamed or does not exist.","commonSituations":"Misspelling a package name; requesting a third-party package via `remotion add` instead of the package manager; version mismatch where a package exists in newer Remotion but not the installed CLI.","solutions":["Check the spelling against `listOfRemotionPackages` (e.g. @remotion/shapes, @remotion/motion-blur).","Use `EXTRA_PACKAGES` entries only — the error lists the supported extras.","Install non-Remotion packages with your package manager (npm/yarn/bun) directly.","Upgrade the Remotion CLI if the package was added in a newer version."],"exampleFix":"// before\nnpx remotion add @remotion/shape\n\n// after\nnpx remotion add @remotion/shapes","handlingStrategy":"validation","validationCode":"import {listOfRemotionPackages} from '@remotion/cli/list-of-remotion-packages';\nimport {EXTRA_PACKAGES} from '@remotion/cli/extra-packages';\nfunction isValidAddTarget(pkg: string): boolean {\n  return listOfRemotionPackages.includes(pkg) || !!EXTRA_PACKAGES[pkg];\n}","typeGuard":"const isAddablePackage = (pkg: string): boolean =>\n  listOfRemotionPackages.includes(pkg) || !!EXTRA_PACKAGES[pkg];","tryCatchPattern":"try { await addCommand({...}); }\ncatch (e) {\n  if (e instanceof Error && /not Remotion packages/.test(e.message)) {\n    // prompt user to correct the name; do not auto-retry.\n  }\n}","preventionTips":["Check package spelling against the Remotion package list.","Use the package manager directly for non-Remotion packages.","Upgrade the CLI if the package is newer than your CLI version."],"tags":["cli","add","packages","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}