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
- Remove layout="none" when using premountFor/postmountFor.
- Remove premountFor/postmountFor when you need layout="none".
- 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
- Treat premountFor/postmountFor and layout="none" as mutually exclusive in shared components.
- Review prop spreads when reusing sequence components.
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
- The layout prop of <Sequence /> expects either "absolute-fil
- The cropLeft, cropRight, cropTop and cropBottom props of <Se
- If layout="none", you may not pass a style. Passed: ${JSON.s
- It is not supported to pass both a `ref` and `layout="none"`
- You passed to durationInFrames an argument of type ${typeof
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f0a5435ed0ee9bb9.
Report an issue: GitHub.