remotion-dev/remotion · error · Error

errors[0].message + '\n' + errors[0].details

Error message

errors[0].message + '\n' + errors[0].details

What it means

After running the rspack bundling path, internalBundle inspects the compilation output's errors array. If there is at least one error, it throws the first error's message concatenated with its details. This is a pass-through of the underlying rspack build error (module not found, syntax error, resolve failure, etc.), not a Remotion-specific fault.

Source

Thrown at packages/bundler/src/bundle.ts:333

					if (err) {
						reject(err);
						return;
					}

					rspackCompiler.close(() => {
						resolve(stats);
					});
				},
			);
		});

		if (isMainThread) {
			process.chdir(currentCwd);
		}

		const {errors} = rspackOutput.toJson({});
		if (errors !== undefined && errors.length > 0) {
			throw new Error(errors[0].message + '\n' + errors[0].details);
		}
	} else {
		const runWebpack = async () => {
			const output = (await promisified([config as webpack.Configuration])) as
				| webpack.MultiStats
				| undefined;
			if (isMainThread) {
				process.chdir(currentCwd);
			}

			if (!output) {
				throw new Error('Expected webpack output');
			}

			const {errors} = output.toJson();
			if (errors !== undefined && errors.length > 0) {
				throw new Error(errors[0].message + '\n' + errors[0].details);
			}

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the full message + details to identify the failing module and the underlying cause.
  2. Fix the offending import/syntax/missing dependency, then re-run.
  3. Confirm all packages in the user project are installed (bun install / npm install).
  4. If the error references an internal Remotion module, check that Remotion packages are at compatible versions.

Example fix

// before
// import {Sequence} from 'remotion-extra'; // package not installed -> rspack error

// after
import {Sequence} from 'remotion';
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await bundle({entryPoint, bundler: 'rspack'});
} catch (err) {
  const msg = String((err as Error)?.message ?? '');
  if (msg.includes('Module not found') || msg.includes('resolve')) {
    // surface the specific module/import path to fix
  }
  throw err;
}

Prevention

When it happens

Trigger: Any rspack compilation error during bundling: unresolved import, syntax/parse error, circular/missing module, loader failure. The thrown message is rspack's own first error.

Common situations: Missing or misinstalled dependency; typo in an import path; TypeScript/JSX syntax error in user code; incompatible loader/version; missing file extension that resolve rules can't recover.

Related errors


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