remotion-dev/remotion · error · Error

The --experimental-rspack flag has been removed. Use --rspac

Error message

The --experimental-rspack flag has been removed. Use --rspack from now on.

What it means

Thrown by parseCommandLine if the legacy --experimental-rspack flag is present. Rspack support graduated from experimental, so the flag was renamed to --rspack and the old form is hard-rejected to force users onto the stable name.

Source

Thrown at packages/cli/src/parse-command-line.ts:9

import {BrowserSafeApis} from '@remotion/renderer/client';
import {Config} from './config';
import {parsedCli} from './parsed-cli';

const {licenseKeyOption} = BrowserSafeApis.options;

export const parseCommandLine = () => {
	if (parsedCli['experimental-rspack'] !== undefined) {
		throw new Error(
			'The --experimental-rspack flag has been removed. Use --rspack from now on.',
		);
	}

	if (parsedCli.png) {
		throw new Error(
			'The --png flag has been removed. Use --sequence --image-format=png from now on.',
		);
	}

	const {value: licenseKey, source} = licenseKeyOption.getValue({
		commandLine: parsedCli,
	});
	if (source === 'cli' && licenseKey?.startsWith('rm_pub_')) {
		Config.setPublicLicenseKey(licenseKey);
	}
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Replace `--experimental-rspack` with `--rspack`.
  2. Update any npm scripts, CI configs, and documentation that reference the old flag.
  3. If you do not need Rspack, simply remove the flag.

Example fix

// before
$ npx remotion render MyComp out.mp4 --experimental-rspack
// after
$ npx remotion render MyComp out.mp4 --rspack
Defensive patterns

Strategy: validation

Validate before calling

const ensureNoLegacyRspack = (argv: string[]) => {
  if (argv.includes('--experimental-rspack')) {
    throw new Error('Use --rspack instead of the removed --experimental-rspack');
  }
};

ensureNoLegacyRspack(process.argv);

Type guard

const usesRspackFlag = (argv: string[]): boolean =>
  argv.includes('--rspack');

Prevention

When it happens

Trigger: Invoking any CLI command with `--experimental-rspack` on the command line or in an npm script.

Common situations: Scripts/docs from when Rspack was experimental; copy-pasting an old `remotion render --experimental-rspack` invocation; CI YAML that has not been updated.

Related errors


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