remotion-dev/remotion · error · Error

`<Sequence>` with `premountFor` and `postmountFor` props doe

Error message

`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"

What it means

Thrown by the premount/postmount variant of <Sequence> when layout="none" is also passed. Premounting and postmounting rely on a wrapping element to apply premount/postmount styles and lifecycle, which layout="none" cannot provide.

Source

Thrown at packages/core/src/Sequence.tsx:654

					ref={sequenceRef}
					style={defaultStyle}
					className={other.className}
				>
					{frozenContent}
				</AbsoluteFillElement>
			)}
		</SequenceContext.Provider>
	);
};

const RegularSequence = forwardRef(RegularSequenceRefForwardingFunction);

const PremountedPostmountedSequenceRefForwardingFunction: React.ForwardRefRenderFunction<
	HTMLDivElement,
	SequenceProps
> = (props, ref) => {
	if (props.layout === 'none') {
		throw new Error(
			'`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"',
		);
	}

	const {
		style: passedStyle,
		from = 0,
		durationInFrames = Infinity,
		premountFor = 0,
		postmountFor = 0,
		styleWhilePremounted,
		styleWhilePostmounted,
		...otherProps
	} = props;

	const {
		freezeFrame,
		isPremountingOrPostmounting,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Remove layout="none" when using premountFor/postmountFor.
  2. Remove premountFor/postmountFor when you need layout="none".
  3. Re-architect: keep the layout default and style the wrapper, or use a separate sequence for premounted content.

Example fix

// before
<Sequence premountFor={30} layout="none">...</Sequence>

// after
<Sequence premountFor={30}>...</Sequence>
Defensive patterns

Strategy: validation

Validate before calling

const hasPremount = (premountFor ?? 0) > 0 || (postmountFor ?? 0) > 0;
if (hasPremount && layout === 'none') {
  throw new Error('premount/postmount requires a wrapping layout');
}

Prevention

When it happens

Trigger: Passing both premountFor (or postmountFor) and layout="none" to <Sequence>. The dedicated PremountedPostmountedSequence code path immediately rejects this.

Common situations: Optimizing perceived load time with premountFor then switching to layout="none" without removing premount props; copying props between sequences verbatim.

Related errors


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