{"record":{"id":"6c1118d727c57491","repo":"remotion-dev/remotion","slug":"errors-0-message-n-errors-0-details","errorCode":null,"errorMessage":"errors[0].message + '\\n' + errors[0].details","messagePattern":"errors\\[0\\]\\.message \\+ '\\\\n' \\+ errors\\[0\\]\\.details","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bundler/src/bundle.ts","lineNumber":333,"sourceCode":"\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\trspackCompiler.close(() => {\n\t\t\t\t\t\tresolve(stats);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\n\t\tif (isMainThread) {\n\t\t\tprocess.chdir(currentCwd);\n\t\t}\n\n\t\tconst {errors} = rspackOutput.toJson({});\n\t\tif (errors !== undefined && errors.length > 0) {\n\t\t\tthrow new Error(errors[0].message + '\\n' + errors[0].details);\n\t\t}\n\t} else {\n\t\tconst runWebpack = async () => {\n\t\t\tconst output = (await promisified([config as webpack.Configuration])) as\n\t\t\t\t| webpack.MultiStats\n\t\t\t\t| undefined;\n\t\t\tif (isMainThread) {\n\t\t\t\tprocess.chdir(currentCwd);\n\t\t\t}\n\n\t\t\tif (!output) {\n\t\t\t\tthrow new Error('Expected webpack output');\n\t\t\t}\n\n\t\t\tconst {errors} = output.toJson();\n\t\t\tif (errors !== undefined && errors.length > 0) {\n\t\t\t\tthrow new Error(errors[0].message + '\\n' + errors[0].details);\n\t\t\t}","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/bundler/src/bundle.ts#L315-L351","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the full message + details to identify the failing module and the underlying cause.","Fix the offending import/syntax/missing dependency, then re-run.","Confirm all packages in the user project are installed (bun install / npm install).","If the error references an internal Remotion module, check that Remotion packages are at compatible versions."],"exampleFix":"// before\n// import {Sequence} from 'remotion-extra'; // package not installed -> rspack error\n\n// after\nimport {Sequence} from 'remotion';","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await bundle({entryPoint, bundler: 'rspack'});\n} catch (err) {\n  const msg = String((err as Error)?.message ?? '');\n  if (msg.includes('Module not found') || msg.includes('resolve')) {\n    // surface the specific module/import path to fix\n  }\n  throw err;\n}","preventionTips":["Keep all imports resolvable: install every package user code imports.","Run a typecheck before bundling to catch syntax/import errors early.","When upgrading, verify all @remotion/* packages are on compatible versions.","Read the full message + details — it names the failing module."],"tags":["bundler","rspack","compilation","build-error"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}