{"record":{"id":"2eb0ef18c969142e","repo":"windmill-labs/windmill","slug":"entry-point-entrypoint-not-found-please-ensu","errorCode":null,"errorMessage":"Entry point \"${entryPoint}\" not found. Please ensure the file exists.","messagePattern":"Entry point \"(.+?)\" not found\\. Please ensure the file exists\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/app/bundle.ts","lineNumber":326,"sourceCode":"  // Native esbuild with a transparent esbuild-wasm fallback on host/binary\n  // version mismatch (see esbuild_loader.ts).\n  const esbuild = await getEsbuild();\n\n  // Detect frameworks to determine default entry point.\n  // Use the entryPoint's directory if provided, otherwise fall back to cwd.\n  const appDir = options.entryPoint ? path.dirname(options.entryPoint) : process.cwd();\n  const frameworks = detectFrameworks(appDir);\n  const defaultEntry = (frameworks.svelte || frameworks.vue) ? \"index.ts\" : \"index.tsx\";\n\n  const entryPoint = options.entryPoint ?? defaultEntry;\n  const outDir = options.outDir ?? \"dist\";\n  const sourcemap = options.sourcemap ?? false;\n  const minify = options.minify ?? true;\n  const production = options.production ?? true;\n\n  // Verify entry point exists\n  if (!fs.existsSync(entryPoint)) {\n    throw new Error(\n      `Entry point \"${entryPoint}\" not found. Please ensure the file exists.`\n    );\n  }\n\n  // Ensure node_modules exists in the app directory\n  await ensureNodeModules(appDir);\n\n  // Load framework-specific plugins (svelte, vue) based on package.json\n  const frameworkPlugins = await createFrameworkPlugins(appDir);\n\n  // Ensure output directory exists\n  const distDir = path.join(process.cwd(), outDir);\n  if (!fs.existsSync(distDir)) {\n    fs.mkdirSync(distDir, { recursive: true });\n  }\n\n  const outfile = path.join(outDir, \"bundle.js\");\n","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/app/bundle.ts#L308-L344","documentation":"Validation in createBundle before esbuild runs: the resolved entry point (either options.entryPoint or the framework-derived default — index.ts for Svelte/Vue, index.tsx otherwise) does not exist on disk in the app directory. The appDir itself is derived from the entry point's dirname or cwd, so a wrong --entry-point flag or running the bundler from a directory without an index file is the usual cause.","triggerScenarios":"Thrown at cli/src/commands/app/bundle.ts:326 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the expected entry file (index.tsx for React-style apps, index.ts for Svelte) in the app directory","Pass an explicit --entry-point pointing at the real entry file","Run the bundle command from the app's root directory so the default entry resolution finds the file"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}