remotion-dev/remotion · error · Error

Could not split JSX sequence

Error message

Could not split JSX sequence

What it means

splitJsxSequence commits the split through controller.applyMutation; a null return (the mutation did not change the project, so no node-path mutation was produced) is treated as failure and throws 'Could not split JSX sequence', converted to {success: false, reason} by the catch.

Source

Thrown at packages/browser-studio/src/browser-studio-operations.ts:1427

				sequenceKeys,
				splitFrame,
			});
			const nodePathMutation = controller.applyMutation({
				timelineSelection: null,
				fileName: absolutePath,
				mutate: () => ({
					...project,
					files: {...project.files, [absolutePath]: result.output},
				}),
				nodePathMutationFiles: [
					{
						absolutePath,
						remappings: result.nodePathRemappings,
					},
				],
			});
			if (nodePathMutation === null) {
				throw new Error('Could not split JSX sequence');
			}

			return {success: true, nodePathMutation};
		} catch (error) {
			return {
				success: false,
				reason: error instanceof Error ? error.message : String(error),
				stack: error instanceof Error && error.stack ? error.stack : '',
			};
		}
	};

	const applyCodemod: BrowserStudioOperations['applyCodemod'] = async ({
		codemod,
		dryRun,
		symbolicatedStack,
	}) => {
		try {

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Verify the sequence nodePath resolves in the current file before calling splitJsxSequence.
  2. Update stored node paths after mutations by consuming 'sequence-node-paths-remapped' events.
  3. If it reproduces with a valid path and a real split point, capture the file and report it as a bug.
Defensive patterns

Strategy: validation

Validate before calling

const file = project.files[fileName] ?? '';
if (!file.includes('<Sequence')) {
  // target file has no Sequence to split — refresh state before calling splitJsxSequence
}

Try / catch

const result = await operations.splitJsxSequence({fileName, nodePath, sequenceKeys, splitFrame});
if (!result.success && result.reason === 'Could not split JSX sequence') {
  // nodePath is stale or the split is a no-op: re-resolve the node path and retry once
}

Prevention

When it happens

Trigger: Splitting a Sequence whose nodePath no longer resolves (stale path), or a split request that produces output identical to the input, causing applyMutation to return null.

Common situations: Split actions issued from stale editor state after the target Sequence was moved, renamed, or undone; automation replaying node paths against a changed project.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-08-22). Data as JSON: /api/errors/7ad128575d881451. Report an issue: GitHub.