# WebContainer limits and errors

## Limits

- Node is 22.22.3 and cannot be changed. `engines` and `.nvmrc` are ignored.
- `node:sqlite` loads but has no `exec()` or `prepare()`. Use `@libsql/client` with a `file:` URL.
- workerd and Miniflare cannot run, so the Cloudflare preset cannot run locally in a container.
- Outbound `fetch()` from the app is subject to CORS from a StackBlitz origin. A blocked request fails with `SocketError: other side closed`.
- Spawned arguments lose backslashes. Mount a script file and run it instead of `node -e`.
- Only one container runs per page, and only one `run("dev")` may be active in it.
- The preview origin does not answer a `fetch()` from the page. Show it in an `<iframe>`.
- `createNodeModulesSnapshot()` requires Linux, macOS, or WSL. It rejects Windows before it changes files, because npm's Windows command shims cannot be restored as POSIX bin links.

## Errors

`bootWebContainer()` throws `WEB_CONTAINER_UNSUPPORTED` when the page cannot run a WebContainer, and `createNodeModulesSnapshot()` throws `WEB_CONTAINER_SNAPSHOT_LOCKFILE_MISMATCH` when the `lockfile` that you pass no longer matches the app. Each error has a `fix` and a `docs` link to its page.

### `RangeError: Offset is outside the bounds of the DataView`

One container failed with this error after two full ViteHub installs. Use one container for each app, and call `teardown()` before you boot the next.

### A second `run("dev")` rejects

Only one `dev` run may be active, also while it spawns. Call `kill()` on the first run and await its `exit` before you start it again.

<!-- 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) (this page)

Next: [WEB_CONTAINER_SNAPSHOT_LINKS_FAILED](https://vitehub.dev/raw/docs/web-container/diagnostics/web_container_snapshot_links_failed.md)

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