{"record":{"id":"c39c28dfcf54dc1f","repo":"remotion-dev/remotion","slug":"no-output-files-found-in-the-config-file","errorCode":null,"errorMessage":"No output files found in the config file.","messagePattern":"No output files found in the config file\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/load-config.ts","lineNumber":49,"sourceCode":"\t\tentryPoints: [resolved],\n\t\ttsconfig: isJavascript ? undefined : tsconfigJson,\n\t\tabsWorkingDir: remotionRoot,\n\t\toutfile: virtualOutfile,\n\t\twrite: false,\n\t\tpackages: 'external',\n\t});\n\tif (result.errors.length > 0) {\n\t\tthrow new Error(\n\t\t\t`Error in remotion.config.ts file: ${result.errors\n\t\t\t\t.map((error) => error.text)\n\t\t\t\t.join('\\n')}`,\n\t\t);\n\t}\n\n\tconst firstOutfile = result.outputFiles[0];\n\n\tif (!firstOutfile) {\n\t\tthrow new Error('No output files found in the config file.');\n\t}\n\n\tconst code = new TextDecoder().decode(firstOutfile.contents);\n\treturn {code, remotionRoot, resolved};\n};\n\nexport const executeConfigFile = ({code, remotionRoot}: PreparedConfigFile) => {\n\tlet str = code;\n\n\tconst currentCwd = process.cwd();\n\n\t// The config file is always executed from the Remotion root, if `process.cwd()` is being used. We cannot enforce this in worker threads used for testing\n\tif (isMainThread) {\n\t\tprocess.chdir(remotionRoot);\n\t}\n\n\tif (process.env.PATCH_BUN_DEVELOPMENT) {\n\t\tstr = str.replace('@remotion/cli/config', './config');","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/load-config.ts#L31-L67","documentation":"Thrown by prepareConfigFile when esbuild completed with zero errors but produced no outputFiles. This is an internal invariant failure: a successful build with write:false should always emit at least one output artifact.","triggerScenarios":"An esbuild configuration that suppresses output (extremely unusual given the fixed options passed); an esbuild version incompatibility; an empty entry file that esbuild trims to nothing under specific flags.","commonSituations":"Rarely hit in practice; usually indicates a corrupted esbuild install, an outdated @remotion/bundler, or an esbuild downgrade. May also occur if remotion.config.ts is empty and esbuild emits nothing under the configured options.","solutions":["Ensure remotion.config.ts has at least one statement (an empty file can produce no output).","Reinstall node_modules to reset esbuild: `rm -rf node_modules && bun install`.","Upgrade @remotion/cli and @remotion/bundler to matching versions (`npx remotion upgrade`).","If it persists, file a Remotion issue with the config file and esbuild version."],"exampleFix":"// before: empty remotion.config.ts\n// after: add at least one config statement\nimport {Config} from '@remotion/cli/config';\nConfig.setVideoImageFormat('jpeg');","handlingStrategy":"validation","validationCode":"import {readFileSync} from 'node:fs';\n\nconst ensureNonEmptyConfig = (configPath: string) => {\n  const content = readFileSync(configPath, 'utf8').trim();\n  if (content.length === 0) {\n    throw new Error('remotion.config.ts is empty - add at least one Config statement.');\n  }\n};\n\nensureNonEmptyConfig(configPath);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep at least one Config.* call in remotion.config.ts.","Reinstall node_modules if you suspect a corrupted esbuild.","Keep @remotion/cli and @remotion/bundler versions aligned."],"tags":["cli","config","esbuild","internal"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}