remotion-dev/remotion · error · TypeError
The <Series /> component only accepts a list of <Series.Sequ
Error message
The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}" What it means
<Series> flattens its children and validates each is a <Series.Sequence>. A child that is a non-whitespace string (a text node) throws because Series cannot schedule raw text. Whitespace-only strings are silently skipped via `castedChild.trim() === ''`.
Source
Thrown at packages/core/src/series/index.tsx:166
const renderChildren = (i: number, startFrame: number): React.ReactNode => {
if (i === flattenedChildren.length) {
return null;
}
const child = flattenedChildren[i];
const castedChild = child as unknown as
| {
props: InternalSeriesSequenceProps;
type: typeof SeriesSequence;
}
| string;
if (typeof castedChild === 'string') {
// Don't throw if it's just some accidential whitespace
if (castedChild.trim() === '') {
return renderChildren(i + 1, startFrame);
}
throw new TypeError(
`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`,
);
}
if (castedChild.type !== SeriesSequence) {
throw new TypeError(
`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`,
);
}
const castedElement = castedChild as React.ReactElement<
InternalSeriesSequenceProps,
typeof SeriesSequence
>;
validateSeriesSequenceProps({
durationInFrames: castedElement.props.durationInFrames,
offset: castedElement.props.offset,
index: i,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Remove stray text nodes from <Series> children.
- Wrap any real content inside a <Series.Sequence>.
Example fix
// before
<Series>
hello
<Series.Sequence durationInFrames={30} />
</Series>
// after
<Series>
<Series.Sequence durationInFrames={30} />
</Series> Defensive patterns
Strategy: validation
Validate before calling
// Static lint rule: only <Series.Sequence> as direct children of <Series>. // Runtime: flatten children and assert none are non-whitespace strings.
Type guard
const isSeriesChild = ( c: React.ReactNode, ): c is React.ReactElement => typeof c !== 'string' && React.isValidElement(c) && (c.type as any) === SeriesSequence;
Prevention
- Keep <Series> children limited to <Series.Sequence>.
- Remove accidental text/whitespace-with-content between sequences.
- Review JSX formatting artifacts from editors.
When it happens
Trigger: <Series>some text</Series>, <Series>{`text`}</Series>, or stray text typed between Sequence children.
Common situations: Accidental text/typo between Sequence children; formatting artifacts; editor auto-inserting characters.
Related errors
- The <Series /> component only accepts a list of <Series.Sequ
- The "offset" property of a <Series.Sequence /> must not be N
- The "offset" property of a <Series.Sequence /> must be finit
- This component must be inside a <Series /> component.
- The "durationInFrames" prop ${component} is missing.
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/ce380f8f3c3180f7.
Report an issue: GitHub.