# VITE_HUB_PACKAGE_VERSION_UNSUPPORTED

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

The build stops with `VITE_HUB_PACKAGE_VERSION_UNSUPPORTED` when an installed `@vite-hub/*` package does not come from the release of the installed `vite-hub`. The message names each package, its installed version, and the versions that `vite-hub` supports:

```text [output/unsupported-vitehub-package.txt]
[VITE_HUB_PACKAGE_VERSION_UNSUPPORTED] @vite-hub/agent 0.0.0-preview-8724a59 is installed, but vite-hub 0.0.0-preview-391b51f supports @vite-hub/agent@0.1.0 || 0.0.0-preview-391b51f. ViteHub packages of another release do not work with this vite-hub. The app can build and then fail at runtime, or run the code of the other release.
├▶ fix: Install the ViteHub packages of the same release as vite-hub: `pnpm add https://pkg.pr.new/vite-hub/vitehub/@vite-hub/agent@391b51fd4b56d75242fb767bdd2b001808dba29f`. When pnpm `overrides`, `resolutions`, or the lockfile pin a @vite-hub package, change them to the same release too, then install again.
╰▶ see: https://vitehub.dev/docs/development/diagnostics/vite_hub_package_version_unsupported
```

## Why it happens

`vite-hub` and the `@vite-hub/*` packages share internal contracts that can change in any commit. `vite-hub` lists the versions of each package that it supports. A package of another release can build and then fail at runtime, or run the old code of a feature without an error.

The usual causes:

- An upgrade changed `vite-hub` in `package.json`, but not the `@vite-hub/*` packages.
- pnpm `overrides` in `pnpm-workspace.yaml` or `package.json`, or `resolutions`, still pin the packages to the earlier release. pnpm applies them, so `pnpm install --frozen-lockfile` passes and installs the earlier release.

Other packages that `vite-hub` supports, such as `drizzle-orm`, only print a warning when their version is out of range.

## Fix it

Run the `pnpm add` command of the message. When `overrides` pin the packages, change them to the same release:

```diff [pnpm-workspace.yaml]
 overrides:
-  "@vite-hub/agent": https://pkg.pr.new/vite-hub/vitehub/@vite-hub/agent@8724a59e6864f59c269361ad7325d52cf63f4106
+  "@vite-hub/agent": https://pkg.pr.new/vite-hub/vitehub/@vite-hub/agent@391b51fd4b56d75242fb767bdd2b001808dba29f
```

Then run `pnpm install` and commit the lockfile.

## Check the fix

Run the build again. It does not report `VITE_HUB_PACKAGE_VERSION_UNSUPPORTED`.

## Related

- [Add feature packages](https://vitehub.dev/docs/getting-started/installation#add-feature-packages)

## Source

`VITE_HUB_PACKAGE_VERSION_UNSUPPORTED` belongs to the `vite-hub` package. Its catalog entry is in [`src/error-diagnostics.ts`](https://github.com/vite-hub/vitehub/blob/main/packages/vite-hub/src/error-diagnostics.ts#L104). It is raised in [`src/internal/optional-owners.ts`](https://github.com/vite-hub/vitehub/blob/main/packages/vite-hub/src/internal/optional-owners.ts#L385).

See [all Development diagnostics](https://vitehub.dev/docs/development/diagnostics).

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

- [Local tools](https://vitehub.dev/raw/docs/development.md)
- [Build state](https://vitehub.dev/raw/docs/development/provisioning.md)
- [Proof and recovery](https://vitehub.dev/raw/docs/development/testing.md)

Next: [VITE_HUB_PUBLIC_URL_INVALID](https://vitehub.dev/raw/docs/development/diagnostics/vite_hub_public_url_invalid.md)

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