786 words
4 minutes

wrangler deploy “Missing entry-point”: Deploy a Static dist Directory

2026-08-19
DevOps
Cloudflare
/
DevOps
/
Deployment
/
Troubleshooting

When wrangler deploy stops with Missing entry-point, Wrangler cannot tell what should be deployed. It found a configuration or command without a Worker main entry and without a usable static assets directory.

For a static build that already produces dist/, the narrow fix is:

Terminal window
pnpm build
pnpm exec wrangler deploy --assets ./dist

For a Worker, declare its script instead:

Terminal window
pnpm exec wrangler deploy src/index.ts

The better long-term choice is to put the deployment model in wrangler.jsonc, so local commands and CI use the same source of truth.

First decide: Worker code, static assets, or both#

Wrangler supports three different shapes that are easy to mix up:

Deployment shapeWhat Wrangler needsTypical configuration
Worker onlyA module entry pointmain: "src/index.ts"
Static assets onlyA directory containing the built filesassets.directory: "./dist"
Worker plus assetsBoth the Worker entry and the asset directorymain plus assets.directory

The Workers command reference accepts a Worker entry point or a static assets directory. The Static Assets guide shows assets.directory as the place to declare the folder that Wrangler uploads.

This is a deployment-boundary error, not an Astro routing error. Count and inspect the output before changing routes:

Terminal window
pnpm build
test -d dist
find dist -type f | head -20

If the build writes build/, out/, or another directory, replace ./dist with that real output path. A correct command pointed at an empty or non-existent directory still cannot deploy the site you built.

Put a static Astro build in wrangler.jsonc#

For a static-only deployment, use a configuration like this:

{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "my-static-site",
"compatibility_date": "2026-08-19",
"assets": {
"directory": "./dist"
}
}

Run the build before deployment:

Terminal window
pnpm build
pnpm exec wrangler deploy

If the project has a Worker that handles API routes or request-time rendering, add its entry point rather than removing the code that needs to run:

{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "my-worker-site",
"main": "src/index.ts",
"compatibility_date": "2026-08-19",
"assets": {
"directory": "./dist"
}
}

Do not copy a pages_build_output_dir setting from a Cloudflare Pages project into a Workers Static Assets configuration. The Cloudflare Pages file-limit guide explains the product distinction and the separate migration decision. assets.directory is the Workers configuration boundary.

Diagnose CI-specific missing entry points#

The same repository can work locally and fail in CI when the build runs in one directory while Wrangler looks for configuration in another. Log the inputs that determine the deployment:

Terminal window
pwd
pnpm exec wrangler --version
test -f wrangler.jsonc && sed -n '1,160p' wrangler.jsonc
pnpm build
find dist -maxdepth 2 -type f | head -20
pnpm exec wrangler deploy

Check these boundaries in order:

  1. The job is running from the package that owns the Wrangler config.
  2. The build command completed before wrangler deploy started.
  3. The configured asset directory exists in the CI filesystem.
  4. The CI checkout includes the configuration and generated output.
  5. The deployed project uses the same config variant and environment as the local command.

If the configuration is generated or stored outside the working directory, pass the intended config explicitly using the Wrangler option supported by the installed CLI rather than relying on the current directory. Keep the final command in CI visible enough that a missing path is diagnosable from the log.

Cloudflare’s build troubleshooting guide describes the same missing-entry-point failure and points to the project root and configuration file as first checks. The Workers SDK issue #10563 is useful as a symptom reference, but your project’s actual output path remains the decisive evidence.

Verify the deployed shape#

After the command succeeds, test one request for each kind of output:

  • an HTML page generated into dist/;
  • a CSS or JavaScript asset;
  • a missing URL that should return the intended 404 behavior;
  • a Worker route, if main is configured;
  • an API or binding-backed route, if the site is not purely static.

Do not infer SSR support from a successful asset upload. A static asset deployment can serve a polished site while still lacking request-time sessions, bindings, or API execution. The existing Astro Cloudflare session binding guide covers the separate case where an Astro Worker needs a KV binding.

The practical fix is to make the deployment shape explicit. Give Wrangler a Worker entry when code must execute, give it the directory that actually contains the static build when it does not, and keep the same configuration visible to local commands and CI.

FAQ#

Q: Can I deploy a static dist/ folder without a Worker entry point?#

A: Yes. Configure assets.directory or pass --assets ./dist to wrangler deploy. A Worker main is needed only when Worker code must execute alongside the assets.

Q: Why does wrangler deploy work locally but fail in CI?#

A: CI may run from a different root, omit wrangler.jsonc, build to a different directory, or start deployment before the build finishes. Print the working directory, config, Wrangler version, and generated output in the failing job.

Q: Is pages_build_output_dir the same as assets.directory?#

A: No. pages_build_output_dir belongs to Cloudflare Pages configuration. Workers Static Assets uses assets.directory; moving between products requires an intentional migration and route check.

References:

Cloudflare Workers Wrangler commands

Cloudflare Workers Static Assets

Cloudflare Builds troubleshooting

workers-sdk issue #10563: Missing entry-point

wrangler deploy “Missing entry-point”: Deploy a Static dist Directory
https://laplusda.com/en/posts/wrangler-missing-entry-point-static-assets/
Author
Zero
Published at
2026-08-19
License
CC BY-NC-SA 4.0
Was this article useful?

Report a typo or broken link, or suggest a related topic.