remotion-dev/remotion · error

New composition ID does not match installation target

Error message

New composition ID does not match installation target

What it means

When a browser-studio operation installs a new composition via a codemod, the codemod's newId must equal the request's compositionId — the ID the UI expects the new composition to register under. A mismatch means the codemod and the request disagree about what the composition will be called, so the result would not match the installation target. The operation aborts before writing any files.

Solutions

  1. Regenerate the codemod so newId matches request.compositionId.
  2. Update the request's compositionId to the codemod's newId.
  3. Re-run the flow that produced the installation request so both fields are derived from one source.

Example fix

// before
{compositionId: 'MyComp', codemod: {newId: 'MyCompOld'}}
// after
{compositionId: 'MyComp', codemod: {newId: 'MyComp'}}
Defensive patterns

Strategy: validation

Validate before calling

if (newComposition && newComposition.codemod.newId !== compositionId)
  throw new Error('newId must equal compositionId');

Try / catch

try {
  await applyOperation(request);
} catch (e) {
  if (String(e).includes('does not match installation target')) rebuildRequest();
}

Prevention

When it happens

Trigger: request.newComposition is non-null and request.newComposition.codemod.newId !== request.compositionId.

Common situations: Stale or hand-edited codemod payloads; agents renaming a composition in one place but not the other; retrying an operation after the target ID changed.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/885eeb88cd237be8. Report an issue: GitHub.

Appendix: source

Thrown at packages/browser-studio/src/browser-studio-operations.ts:2045

				}

				if (
					componentOwnsSequence &&
					request.element.initialProps?.style !== undefined &&
					(request.element.initialProps.style === null ||
						typeof request.element.initialProps.style !== 'object' ||
						Array.isArray(request.element.initialProps.style))
				) {
					throw new Error(
						'Component-owned Element initial style must be an object',
					);
				}

				const originalProject = getProject();
				let project = originalProject;
				if (request.newComposition !== null) {
					if (request.newComposition.codemod.newId !== request.compositionId) {
						throw new Error(
							'New composition ID does not match installation target',
						);
					}

					const absolutePath = resolveCodemodTargetFile({
						codemod: request.newComposition.codemod,
						project,
						symbolicatedStack: request.newComposition.symbolicatedStack,
					});
					if (absolutePath !== request.compositionFile) {
						throw new Error(
							'New composition source does not match installation target',
						);
					}

					const input = project.files[absolutePath];
					const {newContents} = parseAndApplyCodemod({
						input,

View on GitHub (pinned to 46a3a6bf13)