remotion-dev/remotion · error · Error
No remotion.config.ts file found
Error message
No remotion.config.ts file found
What it means
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.
Source
Thrown at packages/create-video/src/add-tailwind.ts:31
}
const root = fs.readFileSync(rootFile, 'utf-8');
const newFile = `import "./index.css";\n${root}`;
fs.writeFileSync(rootFile, newFile);
const css = `@import "tailwindcss";\n`;
fs.writeFileSync(indexCss, css);
};
export const addTailwindToConfig = (projectRoot: string) => {
const configFileTs = path.join(projectRoot, 'remotion.config.ts');
const configFileJs = path.join(projectRoot, 'remotion.config.js');
const configFile = fs.existsSync(configFileTs) ? configFileTs : configFileJs;
if (!fs.existsSync(configFile)) {
throw new Error('No remotion.config.ts file found');
}
const config = fs.readFileSync(configFile, 'utf-8');
const lines = config.trim().split('\n');
let lineNo = 0;
let lastImportLine = 0;
for (const line of lines) {
if (line.startsWith('import ')) {
lastImportLine = lineNo;
}
lineNo++;
}
const headerLines = lines.slice(0, lastImportLine + 1);
const tailLines = lines.slice(lastImportLine + 1);
const newLines = [View on GitHub (pinned to 78fe4bb3fd)
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.
Example fix
// before: no remotion.config.ts present
// create remotion.config.ts:
// after
import {Config} from '@remotion/cli/config';
Config.overrideWebpack((cfg) => cfg); Defensive patterns
Strategy: validation
Validate before calling
import fs from 'fs'; import path from 'path'; const configExists = (projectRoot: string): boolean => fs.existsSync(path.join(projectRoot, 'remotion.config.ts')) || fs.existsSync(path.join(projectRoot, 'remotion.config.js'));
Type guard
const hasRemotionConfig = (projectRoot: string): boolean => fs.existsSync(path.join(projectRoot, 'remotion.config.ts')) || fs.existsSync(path.join(projectRoot, 'remotion.config.js'));
Prevention
- 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}.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No Root file found
- The public directory was specified as "${p}", which is the r
- The public directory was specified as "${p}", and while this
- The public directory was specified as "${p}", but this folde
- No Remotion packages found in your project. Install Remotion
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/d807f999032e7667.
Report an issue: GitHub.