remotion-dev/remotion · error · Error

No changes were made to the file

Error message

No changes were made to the file

What it means

The apply-visual-control route sends a set of visual-control changes (type: 'apply-visual-control') to a codemod and collects which changes were actually made. If changesMade.length === 0, nothing in the file was modified, so the handler throws instead of pushing an empty undo entry and pretending success.

Solutions

  1. Refresh/reload the composition so the control schema matches the current file
  2. Verify the target element and nodePath still exist in the source file
  3. Only send changes whose values actually differ from the current file content

Example fix

// before: re-applying identical values
applyVisualControlChange({ changes: [{ nodePath, value: currentValue }] });
// after: skip no-op changes first
const realChanges = changes.filter((c) => !deepEqual(c.value, currentValue[c.nodePath]));
if (realChanges.length) applyVisualControlChange({ changes: realChanges });
Defensive patterns

Strategy: validation

Validate before calling

// client-side: only send changes that differ
const applicable = changes.filter((c) => c.value !== currentValue);
if (applicable.length === 0) return; // skip request

Try / catch

try {
  await applyVisualControlChange({changes});
} catch (e) {
  if (/No changes were made/.test(e.message)) {
    // treat as no-op, refresh schema before retrying
  }
}

Prevention

When it happens

Trigger: POSTing to the apply-visual-control route with changes that don't apply — e.g. stale schema/control values that no longer match the target element, a nodePath that no longer exists after external edits, or a change set that is semantically a no-op.

Common situations: Studio UI controls applied after the file was edited in an external editor, or re-applying the same visual-control change twice so the second application has nothing left to change.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/ad128ec6df4cf82b. Report an issue: GitHub.

Appendix: source

Thrown at packages/studio-server/src/preview-server/routes/apply-visual-control-change.ts:79

			fileName,
			action: 'apply visual control change to',
		});

		const fileContents = readFileSync(absolutePath, 'utf-8');
		const ast = parseAst(fileContents);
		const logLine =
			changes.length > 0 ? getVisualControlChangeLine(ast, changes[0].id) : 1;

		const {newContents: output, changesMade} = applyVisualControl({
			input: fileContents,
			transformation: {
				type: 'apply-visual-control',
				changes,
			},
		});

		if (changesMade.length === 0) {
			throw new Error('No changes were made to the file');
		}

		pushToUndoStack({
			filePath: absolutePath,
			oldContents: fileContents,
			newContents: null,
			logLevel,
			remotionRoot,
			logLine,
			description: {
				undoMessage: '↩️  Visual control change',
				redoMessage: '↪️  Visual control change',
			},
			entryType: 'visual-control',
			suppressHmrOnFileRestore: true,
			nodePathRemappings: null,
		});
		suppressUndoStackInvalidation(absolutePath);

View on GitHub (pinned to 46a3a6bf13)