remotion-dev/remotion · error · Error
Cannot create an app named ${chalk.red(`"${folderName}"`)}.
Error message
Cannot create an app named ${chalk.red(`"${folderName}"`)}. ${validation} What it means
Thrown by `assertValidName` in resolve-project-root when `validateName(folderName)` returns a string (i.e. validation failed) rather than `true`. validateName fails if the name is empty/non-string or contains characters outside the URL-friendly set `[a-z0-9@._-]`. The validation message is appended so the developer knows why the name is rejected.
Source
Thrown at packages/create-video/src/resolve-project-root.ts:16
import fs from 'node:fs';
import {readdir, stat} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import path from 'node:path';
import chalk from 'chalk';
import {Log} from './log';
import {mkdirp} from './mkdirp';
import prompts from './prompts';
import {isFlagSelected, isTmpFlagSelected} from './select-template';
import type {Template} from './templates';
import {validateName} from './validate-name';
function assertValidName(folderName: string) {
const validation = validateName(folderName);
if (typeof validation === 'string') {
throw new Error(
`Cannot create an app named ${chalk.red(
`"${folderName}"`,
)}. ${validation}`,
);
}
}
function assertFolderEmptyAsync(projectRoot: string): {exists: boolean} {
const conflicts = fs
.readdirSync(projectRoot)
.filter((file: string) => !/\.iml$/.test(file));
if (conflicts.length > 0) {
Log.newLine();
Log.error(`Something already exists at "${projectRoot}"`);
Log.error('Try using a new directory name, or moving these files.');
Log.newLine();
return {exists: true};View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Use only alphanumeric characters plus @, ., -, and _ in the project name.
- Replace spaces with hyphens: `my-project` instead of `my project`.
- Quote the name if it must contain allowed punctuation, and avoid path separators.
Example fix
// before npx create-video "my cool video" // after npx create-video my-cool-video
Defensive patterns
Strategy: validation
Validate before calling
import {validateName} from './validate-name';
const result = validateName(folderName);
if (result !== true) throw new Error(result); Type guard
const isValidProjectName = (name: string): boolean => typeof name === 'string' && name !== '' && /^[a-z0-9@._-]+$/i.test(name);
Prevention
- Restrict project names to [a-z0-9@._-].
- Replace spaces with hyphens at the CLI.
- Validate the name in your scaffolding script before calling create-video.
When it happens
Trigger: Passing a project folder name to create-video that is empty or contains characters not allowed by validateName (spaces, slashes, colons, emoji, etc.). E.g. `npx create-video my project` or a name with special punctuation.
Common situations: Typing a name with spaces at the CLI; using a path with slashes as the name; Unicode/emoji names; an empty positional argument.
Related errors
- The following packages are not Remotion packages: ${invalidP
- Comma-separated frame selections are only supported by the `
- No composition with the ID "${compId}" found.
- Image format mismatch: ${outName} was given as the ${outName
- Image format mismatch: ${downloadName} was given as the down
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f43114993becded0.
Report an issue: GitHub.