remotion-dev/remotion · error · Error

No JSX nodes were specified for deletion

Error message

No JSX nodes were specified for deletion

What it means

deleteJsxNode guards against empty node lists: if nodes is an empty array it throws 'No JSX nodes were specified for deletion', which the surrounding try/catch converts into a {success: false, reason} result.

Source

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

					timelineSelection: null,
					fileName: 'Install packages',
					mutate: () => nextProject,
					nodePathMutationFiles: null,
				});

				return {success: true};
			} catch (error) {
				return getStructuredError(error);
			}
		},
	};

	const deleteJsxNode: BrowserStudioOperations['deleteJsxNode'] = async ({
		nodes,
	}) => {
		try {
			if (nodes.length === 0) {
				throw new Error('No JSX nodes were specified for deletion');
			}

			const project = getProject();
			const nodesByFile = new Map<
				string,
				(typeof nodes)[number]['nodePath'][]
			>();
			for (const node of nodes) {
				const fileName = findProjectFile({
					filePath: node.fileName,
					project,
				});
				const fileNodes = nodesByFile.get(fileName) ?? [];
				fileNodes.push(node.nodePath);
				nodesByFile.set(fileName, fileNodes);
			}

			const updates = await Promise.all(

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Check nodes.length > 0 before calling deleteJsxNode.
  2. Re-derive the selection from current editor state before building the request.
  3. Disable delete actions when the selection is empty.
Defensive patterns

Strategy: validation

Validate before calling

if (nodes.length > 0) {
  const result = await operations.deleteJsxNode({nodes});
}

Prevention

When it happens

Trigger: Calling deleteJsxNode({nodes: []}) — e.g. a delete action where the selected node paths were all cleared or filtered out before the request.

Common situations: Timeline/visual editor delete flows with an empty selection; stale selection state after the selected nodes were already deleted.

Related errors


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