{"record":{"id":"d807f999032e7667","repo":"remotion-dev/remotion","slug":"no-remotion-config-ts-file-found","errorCode":null,"errorMessage":"No remotion.config.ts file found","messagePattern":"No remotion\\.config\\.ts file found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/create-video/src/add-tailwind.ts","lineNumber":31,"sourceCode":"\t}\n\n\tconst root = fs.readFileSync(rootFile, 'utf-8');\n\n\tconst newFile = `import \"./index.css\";\\n${root}`;\n\tfs.writeFileSync(rootFile, newFile);\n\n\tconst css = `@import \"tailwindcss\";\\n`;\n\tfs.writeFileSync(indexCss, css);\n};\n\nexport const addTailwindToConfig = (projectRoot: string) => {\n\tconst configFileTs = path.join(projectRoot, 'remotion.config.ts');\n\tconst configFileJs = path.join(projectRoot, 'remotion.config.js');\n\n\tconst configFile = fs.existsSync(configFileTs) ? configFileTs : configFileJs;\n\n\tif (!fs.existsSync(configFile)) {\n\t\tthrow new Error('No remotion.config.ts file found');\n\t}\n\n\tconst config = fs.readFileSync(configFile, 'utf-8');\n\tconst lines = config.trim().split('\\n');\n\tlet lineNo = 0;\n\tlet lastImportLine = 0;\n\tfor (const line of lines) {\n\t\tif (line.startsWith('import ')) {\n\t\t\tlastImportLine = lineNo;\n\t\t}\n\n\t\tlineNo++;\n\t}\n\n\tconst headerLines = lines.slice(0, lastImportLine + 1);\n\tconst tailLines = lines.slice(lastImportLine + 1);\n\n\tconst newLines = [","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/create-video/src/add-tailwind.ts#L13-L49","documentation":"Thrown by `addTailwindToConfig` when neither `remotion.config.ts` nor `remotion.config.js` exists at the project root. The function injects a `enableTailwind()` call into the config file; without a config file there is nothing to modify.","triggerScenarios":"Running `create-video` with Tailwind on a project that has no `remotion.config.ts` or `remotion.config.js`. The function checks the .ts then the .js variant and throws if both are missing.","commonSituations":"A minimal/new template that omitted the config file; a project that named its config differently (e.g. `remotion.config.mjs`); deleting the config file before re-running setup.","solutions":["Create a minimal `remotion.config.ts` at the project root before running the setup: `import {Config} from '@remotion/cli/config';`.","Use a template that includes a remotion.config file.","If you use an alternative config filename, rename it to `remotion.config.ts` for the setup step."],"exampleFix":"// before: no remotion.config.ts present\n// create remotion.config.ts:\n// after\nimport {Config} from '@remotion/cli/config';\nConfig.overrideWebpack((cfg) => cfg);","handlingStrategy":"validation","validationCode":"import fs from 'fs';\nimport path from 'path';\n\nconst configExists = (projectRoot: string): boolean =>\n  fs.existsSync(path.join(projectRoot, 'remotion.config.ts')) ||\n  fs.existsSync(path.join(projectRoot, 'remotion.config.js'));","typeGuard":"const hasRemotionConfig = (projectRoot: string): boolean =>\n  fs.existsSync(path.join(projectRoot, 'remotion.config.ts')) ||\n  fs.existsSync(path.join(projectRoot, 'remotion.config.js'));","tryCatchPattern":null,"preventionTips":["Create remotion.config.ts at the project root before running Tailwind setup.","Use a template that includes a config file.","Keep the config filename to the conventional remotion.config.{ts,js}."],"tags":["create-video","tailwind","config","setup"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}