{"record":{"id":"9b22502d95bc56e7","repo":"remotion-dev/remotion","slug":"could-not-find-a-tsconfig-json-file-in-your-projec","errorCode":null,"errorMessage":"Could not find a tsconfig.json file in your project. Did you delete it? Create a tsconfig.json in the root of your project. Copy the default file from https://github.com/remotion-dev/template-helloworld/blob/main/tsconfig.json. The root directory is: ${remotionRoot}","messagePattern":"Could not find a tsconfig\\.json file in your project\\. Did you delete it\\? Create a tsconfig\\.json in the root of your project\\. Copy the default file from https://github\\.com/remotion-dev/template-helloworld/blob/main/tsconfig\\.json\\. The root directory is: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/load-config.ts","lineNumber":21,"sourceCode":"import {isMainThread} from 'node:worker_threads';\nimport {BundlerInternals} from '@remotion/bundler';\n\nexport type PreparedConfigFile = {\n\tcode: string;\n\tremotionRoot: string;\n\tresolved: string;\n};\n\nexport const prepareConfigFile = async (\n\tremotionRoot: string,\n\tconfigFileName: string,\n\tisJavascript: boolean,\n): Promise<PreparedConfigFile> => {\n\tconst resolved = path.resolve(remotionRoot, configFileName);\n\n\tconst tsconfigJson = path.join(remotionRoot, 'tsconfig.json');\n\tif (!isJavascript && !fs.existsSync(tsconfigJson)) {\n\t\tthrow new Error(\n\t\t\t`Could not find a tsconfig.json file in your project. Did you delete it? Create a tsconfig.json in the root of your project. Copy the default file from https://github.com/remotion-dev/template-helloworld/blob/main/tsconfig.json. The root directory is: ${remotionRoot}`,\n\t\t);\n\t}\n\n\tconst virtualOutfile = 'bundle.js';\n\tconst result = await BundlerInternals.esbuild.build({\n\t\tplatform: 'node',\n\t\ttarget: 'node16',\n\t\tbundle: true,\n\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(","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/load-config.ts#L3-L39","documentation":"Thrown by prepareConfigFile when bundling a TypeScript remotion.config.ts (isJavascript=false) and no tsconfig.json exists at the remotion root. esbuild needs a tsconfig to resolve TS in the config file, and Remotion's project template always ships one, so its absence is treated as a user error.","triggerScenarios":"Loading remotion.config.ts (the default) in a project where tsconfig.json was deleted, renamed, or never created. Running in a JS-only project that nonetheless has a .ts config file.","commonSituations":"Accidentally deleting tsconfig.json; git clean removing untracked files; starting from a non-TypeScript template then adding remotion.config.ts; monorepo where tsconfig lives in a parent and remotionRoot is set to a subpackage.","solutions":["Create tsconfig.json in the remotion root. Copy the template from https://github.com/remotion-dev/template-helloworld/blob/main/tsconfig.json.","If you intentionally use plain JS, rename your config to remotion.config.js and ensure the loader is invoked with isJavascript=true (Remotion auto-detects by extension).","In a monorepo, ensure remotionRoot points at the directory that contains tsconfig.json, or extend a parent config."],"exampleFix":"// before: remotion.config.ts present, no tsconfig.json\n// after: add tsconfig.json in the same root\n{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"jsx\": \"react-jsx\",\n    \"strict\": true\n  }\n}","handlingStrategy":"validation","validationCode":"import {existsSync} from 'node:fs';\nimport path from 'node:path';\n\nconst ensureTsConfig = (remotionRoot: string, isJavascript: boolean) => {\n  if (isJavascript) return;\n  const tsconfig = path.join(remotionRoot, 'tsconfig.json');\n  if (!existsSync(tsconfig)) {\n    throw new Error(`Missing ${tsconfig}. Create it from the Remotion template.`);\n  }\n};\n\nensureTsConfig(remotionRoot, configFile.endsWith('.js'));","typeGuard":"const hasTsConfig = (remotionRoot: string): boolean =>\n  existsSync(path.join(remotionRoot, 'tsconfig.json'));","tryCatchPattern":null,"preventionTips":["Commit tsconfig.json to the repo so it survives git clean.","In monorepos, set remotionRoot to the directory containing the tsconfig.","For JS-only projects, name the config remotion.config.js to bypass tsconfig requirement."],"tags":["cli","config","typescript","tsconfig"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}