remotion-dev/remotion · error · Error

This component must be inside a <Series /> component.

Error message

This component must be inside a <Series /> component.

What it means

Series-context hooks (useRequireToBeInsideSeries) read IsInsideSeriesContext, which <Series> sets to true for its descendants and which the <IsOutsideSeries> provider sets to false. If the context is false/absent, calling such a hook throws to enforce that these APIs only run within a <Series>.

Source

Thrown at packages/core/src/series/is-inside-series.tsx:28

			{children}
		</IsInsideSeriesContext.Provider>
	);
};

export const IsNotInsideSeriesProvider: React.FC<{
	readonly children: React.ReactNode;
}> = ({children}) => {
	return (
		<IsInsideSeriesContext.Provider value={false}>
			{children}
		</IsInsideSeriesContext.Provider>
	);
};

export const useRequireToBeInsideSeries = () => {
	const isInsideSeries = React.useContext(IsInsideSeriesContext);
	if (!isInsideSeries) {
		throw new Error('This component must be inside a <Series /> component.');
	}
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Wrap the consuming component in a <Series>.
  2. Use the standalone (non-series) equivalent of the component/hook if one exists.

Example fix

// before
<SeriesChild />
// after
<Series>
  <Series.Sequence durationInFrames={30}><SeriesChild/></Series.Sequence>
</Series>
Defensive patterns

Strategy: type-guard

Validate before calling

// Structure-only guard: ensure the component is only rendered under <Series>.
// React Context default is false, so misuse throws at render time by design.

Type guard

// No runtime type guard needed; the hook itself enforces via context.
// Structural fix: only mount these components inside <Series>.

Prevention

When it happens

Trigger: Using a Series-context hook or Series-only component outside any <Series> ancestor; refactoring that removes the <Series> wrapper around a child that still expects it.

Common situations: Copy-pasting a Series child component into a non-series area; splitting a composition and forgetting to keep the <Series> parent.

Related errors


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