# wrangler dispatch namespace: script not found

## TL;DR

The dispatcher references a script name that is not uploaded to the namespace. Check the uploaded scripts list; the name is misspelled, was never uploaded, or was removed. Names must match exactly.

```text
wrangler dispatch namespace: script not found
```

## Steps

1. List the scripts in the namespace and compare names exactly.
   Expected: The missing name is confirmed.

2. Check for typos, case differences, and stale references.
   Expected: The mismatch is found.

3. Upload the missing script or fix the reference.
   Expected: The dispatch succeeds.

4. Keep the dispatcher config and the uploaded scripts in sync (ideally generated).
   Expected: Drift stops.

5. Verify the dispatch end to end.
   Expected: The routing works.

## When to use

- dispatch fails with script not found
- the namespace was just set up
- scripts were renamed

## When not to use

- the script exists (check for a namespace mismatch)
- the error is on the dispatcher itself (different problem)
- using workers directly (no namespaces involved)

## Tool compatibility

- wrangler
- Workers dispatch namespaces

## Variant phrasings

- "dispatch namespace script not found"
- "worker dispatcher script missing"
- "namespace script not found"

## Why it happens

Dispatch namespaces route to named scripts, and the names are exact-match. A rename, a missed upload, or a typo breaks the route. The namespace does not fuzzy-match; it fails. The fix is keeping the name list and the uploads in agreement.

## Edge cases

- names are case-sensitive; check exactly
- deleting a script breaks dispatchers silently until the next call
- generate the dispatcher config from the upload manifest

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_5kmBfIXsBn-RBg0Ul3zT6A
