remotion-dev/remotion · error · TypeError
bundle() was called without the `entryPoint` option
Error message
bundle() was called without the `entryPoint` option
What it means
When bundle() is called with a single object argument, that object must have a string `entryPoint`. If entryPoint is missing or not a string (undefined, number, object), convertBundleArgumentsIntoOptions throws a TypeError. This catches dynamically-built options where the entry point was never set.
Source
Thrown at packages/bundler/src/bundle.ts:221
}
const firstArg = args[0];
if (typeof firstArg === 'string') {
if (!enableV5BreakingChanges) {
return {
entryPoint: firstArg,
onProgress: args[1],
...(args[2] ?? {}),
};
}
throw new TypeError(
'bundle() no longer supports the legacy positional arguments. Pass an options object instead: bundle({entryPoint, onProgress, ...options}).',
);
}
if (typeof firstArg.entryPoint !== 'string') {
throw new TypeError('bundle() was called without the `entryPoint` option');
}
return firstArg;
};
const recursionLimit = 5;
export const findClosestFolderWithItem = (
currentDir: string,
file: string,
): string | null => {
let possibleFile = '';
for (let i = 0; i < recursionLimit; i++) {
possibleFile = path.join(currentDir, file);
const exists = fs.existsSync(possibleFile);
if (exists) {
return path.dirname(possibleFile);
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure the options object always sets entryPoint to a string path.
- Type the builder so entryPoint is required (BundleOptions already requires it).
- Default entryPoint to a known-good value before calling bundle().
- Double-check the camelCase key name (entryPoint, not entry_point or entrypoint).
Example fix
// before
bundle({...userConfig}); // userConfig has no entryPoint
// after
bundle({entryPoint: './src/index.ts', ...userConfig}); Defensive patterns
Strategy: type-guard
Validate before calling
// Before calling bundle()
const assertBundleOptions = (opts: unknown) => {
if (typeof opts !== 'object' || opts === null || typeof (opts as any).entryPoint !== 'string') {
throw new TypeError('bundle() options must include a string entryPoint');
}
}; Type guard
const isBundleOptions = (arg: unknown): arg is {entryPoint: string; [k: string]: unknown} =>
typeof arg === 'object' && arg !== null && typeof (arg as {entryPoint?: unknown}).entryPoint === 'string'; Prevention
- Always set entryPoint explicitly when constructing options dynamically.
- Rely on BundleOptions' required entryPoint field; do not widen it to optional.
- Beware camelCase: it is entryPoint, not entrypoint or entry_point.
- Validate a config builder's output before forwarding to bundle().
When it happens
Trigger: Calling bundle({}) , bundle({onProgress: fn}), bundle({...rest}) where rest lacks entryPoint, or bundle({entryPoint: someUndefinedVar}).
Common situations: Building options from partial config where entryPoint is conditionally set; typo (entrypoint vs entryPoint); variable shadowing producing undefined; spreading a config that doesn't include entryPoint.
Related errors
- bundle() was called without arguments
- bundle() no longer supports the legacy positional arguments.
- You passed ${entryPoint} as your entry point, but this file
- "${name}" must be greater than 0, but got ${JSON.stringify(v
- "${name}" must be greater than or equal to 0, but got ${JSON
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/c9d851bf2a7afff0.
Report an issue: GitHub.