remotion-dev/remotion · error · Error
Cannot find composition with ID "${compNameResult.compName}"
Error message
Cannot find composition with ID "${compNameResult.compName}" What it means
Thrown by getCompositionId after RenderInternals.internalSelectComposition returns a falsy config for the requested composition id. Remotion loads your entry point in a browser, collects the registered compositions, and if the id you passed is not among them it cannot proceed.
Source
Thrown at packages/cli/src/get-composition-id.ts:137
onServeUrlVisited: () => undefined,
chromeMode,
mediaCacheSizeInBytes,
});
if (propsSize > 10_000_000) {
Log.warn(
{
indent,
logLevel,
},
`The props of your composition are large (${StudioServerInternals.formatBytes(
propsSize,
)}). This may cause slowdown.`,
);
}
if (!config) {
throw new Error(
`Cannot find composition with ID "${compNameResult.compName}"`,
);
}
return {
compositionId: compNameResult.compName,
reason: compNameResult.reason,
config,
argsAfterComposition: compNameResult.remainingArgs,
};
}
const comps = await RenderInternals.internalGetCompositions({
puppeteerInstance,
envVariables,
timeoutInMilliseconds,
chromiumOptions,
port,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- List registered compositions to confirm the exact id: `npx remotion compositions <entry-point>`.
- Match the id exactly, including casing.
- If the composition is conditionally registered, ensure the env/flag that gates it is set the same way at render time as in Studio.
- Check the entry point is the one you expect (see the FoundReason from findEntryPoint).
Example fix
// before $ npx remotion render src/index.tsx myomposition out.mp4 // typo // after $ npx remotion render src/index.tsx myComposition out.mp4
Defensive patterns
Strategy: validation
Validate before calling
import {getCompositions} from '@remotion/renderer';
const ensureComposition = async (serveUrl: string, id: string) => {
const comps = await getCompositions(serveUrl, {inputProps: {}});
if (!comps.some((c) => c.id === id)) {
throw new Error(`Composition '${id}' not registered. Available: ${comps.map(c => c.id).join(', ')}`);
}
};
await ensureComposition(bundleServeUrl, compositionId); Type guard
const isRegisteredComposition = (comps: {id: string}[], id: string): boolean =>
comps.some((c) => c.id === id); Try / catch
try {
await renderMedia(...);
} catch (err) {
if (err instanceof Error && /Cannot find composition with ID/.test(err.message)) {
// list available compositions and surface a helpful message
}
throw err;
} Prevention
- Call getCompositions (or `remotion compositions`) once and cache the id list.
- Treat composition ids as case-sensitive identifiers.
- Avoid conditional registration of compositions; if needed, gate them by a stable env flag.
When it happens
Trigger: Passing --id or a positional composition name that is not registered via <Composition id="..."> or registerRoot in the entry point. The composition is conditionally registered (e.g. behind a feature flag) and the flag is off. A typo or wrong casing in the id.
Common situations: Renaming a composition id but not the render command; dynamic composition ids that resolve differently at bundle time; env-conditional registration; copy-pasting a command from a different project.
Related errors
- No composition with the ID "${compId}" found.
- Image format mismatch: ${downloadName} was given as the down
- Image format mismatch: ${outName} was given as the ${outName
- ${result.file} was chosen as the entry point (reason = ${res
- The output directory of the image sequence cannot have an ex
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/393856170944c62d.
Report an issue: GitHub.