remotion-dev/remotion · error · Error

create-video is a CLI tool only. Run `npx create-video@lates

Error message

create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!

What it means

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.

Source

Thrown at packages/create-video/src/index.ts:12

import {listOfRemotionPackages} from './list-of-remotion-packages';
import {FEATURED_TEMPLATES} from './templates';

export const CreateVideoInternals = {
	FEATURED_TEMPLATES,
	listOfRemotionPackages,
};

export {Template} from './templates';

export default () => {
	throw new Error(
		'create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!',
	);
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Do not import create-video in application code; run it via the CLI: `npx create-video@latest`.
  2. Remove `create-video` from your app's dependencies; it should only ever be invoked through a package runner.
  3. If you need its internals (FEATURED_TEMPLATES etc.), they are not a supported public API — use the CLI instead.

Example fix

// before (wrong)
import createVideo from 'create-video';
createVideo();

// after (use the CLI)
// $ npx create-video@latest
Defensive patterns

Strategy: validation

Validate before calling

// create-video must not be imported; detect accidental import
if (process.env.NODE_ENV !== 'production' && /create-video/.test(require.resolve('create-video'))) {
  console.warn('create-video is CLI-only; do not import it.');
}

Type guard

const isCliInvocation = (): boolean =>
  process.argv[1]?.endsWith('create-video') === true;

Prevention

When it happens

Trigger: `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.

Common situations: 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.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/f9267980f6dd84d1. Report an issue: GitHub.