# WebContainer diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each WebContainer error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 12 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Named errors

| Code | What happened |
| --- | --- |
| [`WEB_CONTAINER_CONNECT_PROVIDER_UNKNOWN`](https://vitehub.dev/docs/web-container/diagnostics/web_container_connect_provider_unknown) | Unknown connect provider "\<name\>". Use one of: \<choices\>. |
| [`WEB_CONTAINER_DEV_RUNNING`](https://vitehub.dev/docs/web-container/diagnostics/web_container_dev_running) | A dev process is already running. Stop it and await its exit before starting another. |
| [`WEB_CONTAINER_FILE_PATH_INVALID`](https://vitehub.dev/docs/web-container/diagnostics/web_container_file_path_invalid) | WebContainer path \<path\> replaces the directory \<part\>. |
| [`WEB_CONTAINER_ROUTE_INVALID`](https://vitehub.dev/docs/web-container/diagnostics/web_container_route_invalid) | hubWebContainer() route "\<route\>" must start with "/". |
| [`WEB_CONTAINER_ROUTES_MISSING`](https://vitehub.dev/docs/web-container/diagnostics/web_container_routes_missing) | hubWebContainer() needs at least one route, such as "/playground/**". |
| [`WEB_CONTAINER_SNAPSHOT_DAMAGED`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_damaged) | The snapshot from \<url\> is damaged: \<detail\> |
| [`WEB_CONTAINER_SNAPSHOT_LINKS_FAILED`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_links_failed) | Restoring the links of the snapshot exited with code \<code\>. |
| [`WEB_CONTAINER_SNAPSHOT_LOCKFILE_MISMATCH`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_lockfile_mismatch) | The lockfile installs \<file\>, which the app does not have. |
| [`WEB_CONTAINER_SNAPSHOT_PART_BYTES_INVALID`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_part_bytes_invalid) | partBytes must be a positive safe integer. |
| [`WEB_CONTAINER_SNAPSHOT_PART_FAILED`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_part_failed) | Snapshot part \<url\> returned \<status\>. |
| [`WEB_CONTAINER_SNAPSHOT_POSIX_REQUIRED`](https://vitehub.dev/docs/web-container/diagnostics/web_container_snapshot_posix_required) | createNodeModulesSnapshot requires a POSIX host (Linux, macOS, or WSL). |
| [`WEB_CONTAINER_UNSUPPORTED`](https://vitehub.dev/docs/web-container/diagnostics/web_container_unsupported) | See the page of the code. |

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/web-container.md)
- [Get started](https://vitehub.dev/raw/docs/web-container/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/web-container/configure.md)
- [Snapshots](https://vitehub.dev/raw/docs/web-container/snapshots.md)
- [API reference](https://vitehub.dev/raw/docs/web-container/reference.md)
- [Limits and errors](https://vitehub.dev/raw/docs/web-container/limits-and-errors.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
