{"record":{"id":"c9d851bf2a7afff0","repo":"remotion-dev/remotion","slug":"bundle-was-called-without-the-entrypoint-optio","errorCode":null,"errorMessage":"bundle() was called without the `entryPoint` option","messagePattern":"bundle\\(\\) was called without the `entryPoint` option","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/bundler/src/bundle.ts","lineNumber":221,"sourceCode":"\t}\n\n\tconst firstArg = args[0];\n\tif (typeof firstArg === 'string') {\n\t\tif (!enableV5BreakingChanges) {\n\t\t\treturn {\n\t\t\t\tentryPoint: firstArg,\n\t\t\t\tonProgress: args[1],\n\t\t\t\t...(args[2] ?? {}),\n\t\t\t};\n\t\t}\n\n\t\tthrow new TypeError(\n\t\t\t'bundle() no longer supports the legacy positional arguments. Pass an options object instead: bundle({entryPoint, onProgress, ...options}).',\n\t\t);\n\t}\n\n\tif (typeof firstArg.entryPoint !== 'string') {\n\t\tthrow new TypeError('bundle() was called without the `entryPoint` option');\n\t}\n\n\treturn firstArg;\n};\n\nconst recursionLimit = 5;\n\nexport const findClosestFolderWithItem = (\n\tcurrentDir: string,\n\tfile: string,\n): string | null => {\n\tlet possibleFile = '';\n\tfor (let i = 0; i < recursionLimit; i++) {\n\t\tpossibleFile = path.join(currentDir, file);\n\t\tconst exists = fs.existsSync(possibleFile);\n\t\tif (exists) {\n\t\t\treturn path.dirname(possibleFile);\n\t\t}","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/bundler/src/bundle.ts#L203-L239","documentation":"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.","triggerScenarios":"Calling bundle({}) , bundle({onProgress: fn}), bundle({...rest}) where rest lacks entryPoint, or bundle({entryPoint: someUndefinedVar}).","commonSituations":"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.","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)."],"exampleFix":"// before\nbundle({...userConfig}); // userConfig has no entryPoint\n\n// after\nbundle({entryPoint: './src/index.ts', ...userConfig});","handlingStrategy":"type-guard","validationCode":"// Before calling bundle()\nconst assertBundleOptions = (opts: unknown) => {\n  if (typeof opts !== 'object' || opts === null || typeof (opts as any).entryPoint !== 'string') {\n    throw new TypeError('bundle() options must include a string entryPoint');\n  }\n};","typeGuard":"const isBundleOptions = (arg: unknown): arg is {entryPoint: string; [k: string]: unknown} =>\n  typeof arg === 'object' && arg !== null && typeof (arg as {entryPoint?: unknown}).entryPoint === 'string';","tryCatchPattern":null,"preventionTips":["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()."],"tags":["bundler","api-misuse","typescript","entry-point"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}