{"record":{"id":"f9267980f6dd84d1","repo":"remotion-dev/remotion","slug":"create-video-is-a-cli-tool-only-run-npx-create-v","errorCode":null,"errorMessage":"create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!","messagePattern":"create-video is a CLI tool only\\. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/create-video/src/index.ts","lineNumber":12,"sourceCode":"import {listOfRemotionPackages} from './list-of-remotion-packages';\nimport {FEATURED_TEMPLATES} from './templates';\n\nexport const CreateVideoInternals = {\n\tFEATURED_TEMPLATES,\n\tlistOfRemotionPackages,\n};\n\nexport {Template} from './templates';\n\nexport default () => {\n\tthrow new Error(\n\t\t'create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!',\n\t);\n};\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/create-video/src/index.ts#L1-L16","documentation":"Thrown by the default export of the `create-video` package. create-video is a CLI-only tool (invoked via `npx create-video@latest`, `pnpm create video`, or `yarn create video`); it is not a runtime library. Importing it as a module (e.g. `import createVideo from 'create-video'`) triggers the default export, which throws to prevent misuse.","triggerScenarios":"`import`-ing the create-video package and calling its default export, or accidentally bundling it into an app as a dependency and executing its entry point.","commonSituations":"Mistakenly adding create-video to dependencies and importing it; a build tool resolving an entry that imports create-video as a library; copy-pasting a CLI snippet into application code.","solutions":["Do not import create-video in application code; run it via the CLI: `npx create-video@latest`.","Remove `create-video` from your app's dependencies; it should only ever be invoked through a package runner.","If you need its internals (FEATURED_TEMPLATES etc.), they are not a supported public API — use the CLI instead."],"exampleFix":"// before (wrong)\nimport createVideo from 'create-video';\ncreateVideo();\n\n// after (use the CLI)\n// $ npx create-video@latest","handlingStrategy":"validation","validationCode":"// create-video must not be imported; detect accidental import\nif (process.env.NODE_ENV !== 'production' && /create-video/.test(require.resolve('create-video'))) {\n  console.warn('create-video is CLI-only; do not import it.');\n}","typeGuard":"const isCliInvocation = (): boolean =>\n  process.argv[1]?.endsWith('create-video') === true;","tryCatchPattern":null,"preventionTips":["Never add create-video to runtime dependencies or import it.","Invoke it only via npx/pnpm/yarn create.","Keep create-video as a dev-only or ad-hoc tool."],"tags":["create-video","cli","usage","api-misuse"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}