{"record":{"id":"f2ecc36dd62dfa5d","repo":"windmill-labs/windmill","slug":"no-entry-point-in-appdir-expected-one-of-can","errorCode":null,"errorMessage":"No entry point in ${appDir}: expected one of ${candidates.join(\", \")}","messagePattern":"No entry point in (.+?): expected one of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/app/bundle_command.ts","lineNumber":23,"sourceCode":"import * as log from \"../../core/log.ts\";\nimport { colors } from \"@cliffy/ansi/colors\";\nimport { createBundle, detectFrameworks } from \"./bundle.ts\";\n\ninterface BundleOptions {\n  out?: string;\n  minify?: boolean;\n}\n\n/** Every entry point a raw app may have, most specific first, with the\n * framework's preferred one promoted — Svelte and Vue mount from a `.ts`. */\nfunction entryPointFor(appDir: string): string {\n  const frameworks = detectFrameworks(appDir);\n  const candidates = frameworks.svelte || frameworks.vue\n    ? [\"index.ts\", \"index.tsx\", \"index.js\"]\n    : [\"index.tsx\", \"index.ts\", \"index.js\"];\n  const entry = candidates.find((c) => fs.existsSync(path.join(appDir, c)));\n  if (!entry) {\n    throw new Error(\n      `No entry point in ${appDir}: expected one of ${candidates.join(\", \")}`,\n    );\n  }\n  return path.join(appDir, entry);\n}\n\n/**\n * Bundle a raw app folder without deploying it. `wmill app push` bundles as part\n * of deploying; this exposes the same build on its own, so anything that needs a\n * raw app's js/css — the server-side bundler behind `/apps/update_raw_source`,\n * most of all — runs this exact build rather than reimplementing it.\n *\n * The result goes to files, not stdout: the build logs to stdout as it runs, so\n * a caller can't read the bundle off the pipe.\n */\nasync function bundleApp(opts: BundleOptions, appFolder?: string) {\n  const appDir = path.resolve(appFolder ?? process.cwd());\n","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/app/bundle_command.ts#L5-L41","documentation":"Thrown by entryPointFor in the bundle command when no expected raw-app entry file exists in the app directory. The candidate list is framework-aware (detectFrameworks decides it): ['index.ts','index.tsx','index.js'] when Svelte or Vue is detected, ['index.tsx','index.ts','index.js'] otherwise. The error names every candidate tried, so the directory was checked and none of them present — the raw app is missing its entry file or you pointed the command at the wrong directory.","triggerScenarios":"Thrown at cli/src/commands/app/bundle_command.ts:23 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create one of the listed candidate files in the app dir — for Svelte/Vue apps index.ts, otherwise index.tsx is conventional","Rename an existing differently-named entry (e.g. main.tsx, App.tsx) to the expected index.* name","Verify the directory passed to the bundle command is actually the raw app root"],"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"}