windmill-labs/windmill · error · Error

Entry point "${entryPoint}" not found. Please ensure the fil

Error message

Entry point "${entryPoint}" not found. Please ensure the file exists.

What it means

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.

Source

Thrown at cli/src/commands/app/bundle.ts:326

  // Native esbuild with a transparent esbuild-wasm fallback on host/binary
  // version mismatch (see esbuild_loader.ts).
  const esbuild = await getEsbuild();

  // Detect frameworks to determine default entry point.
  // Use the entryPoint's directory if provided, otherwise fall back to cwd.
  const appDir = options.entryPoint ? path.dirname(options.entryPoint) : process.cwd();
  const frameworks = detectFrameworks(appDir);
  const defaultEntry = (frameworks.svelte || frameworks.vue) ? "index.ts" : "index.tsx";

  const entryPoint = options.entryPoint ?? defaultEntry;
  const outDir = options.outDir ?? "dist";
  const sourcemap = options.sourcemap ?? false;
  const minify = options.minify ?? true;
  const production = options.production ?? true;

  // Verify entry point exists
  if (!fs.existsSync(entryPoint)) {
    throw new Error(
      `Entry point "${entryPoint}" not found. Please ensure the file exists.`
    );
  }

  // Ensure node_modules exists in the app directory
  await ensureNodeModules(appDir);

  // Load framework-specific plugins (svelte, vue) based on package.json
  const frameworkPlugins = await createFrameworkPlugins(appDir);

  // Ensure output directory exists
  const distDir = path.join(process.cwd(), outDir);
  if (!fs.existsSync(distDir)) {
    fs.mkdirSync(distDir, { recursive: true });
  }

  const outfile = path.join(outDir, "bundle.js");

View on GitHub (pinned to e474e8803c)

Solutions

  1. Create the expected entry file (index.tsx for React-style apps, index.ts for Svelte) in the app directory
  2. Pass an explicit --entry-point pointing at the real entry file
  3. Run the bundle command from the app's root directory so the default entry resolution finds the file
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/app/bundle.ts:326 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/2eb0ef18c969142e. Report an issue: GitHub.