# CLI diagnostics

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

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

## Runtime errors

| Code | What happened |
| --- | --- |
| [`CLI_R0001`](https://vitehub.dev/docs/cli/diagnostics/cli_r0001) | Nuxt config was found, but Nuxt could not be loaded for CLI discovery. |
| [`CLI_R0002`](https://vitehub.dev/docs/cli/diagnostics/cli_r0002) | The installed @vite-hub/cli package manifest has no valid version. |
| [`CLI_R0003`](https://vitehub.dev/docs/cli/diagnostics/cli_r0003) | \<message\> Usage: \<commandUsage\> |
| [`CLI_R0004`](https://vitehub.dev/docs/cli/diagnostics/cli_r0004) | \<name\> changes or removes data and was not confirmed. |
| [`CLI_R0005`](https://vitehub.dev/docs/cli/diagnostics/cli_r0005) | No dev server is running for \<value\>. |

## Errors

| Code | What happened |
| --- | --- |
| [`CLI_CONSOLE_LOGIN_FAILED`](https://vitehub.dev/docs/cli/diagnostics/cli_console_login_failed) | Sign-in to \<console\> did not finish. \<message\> |
| [`CLI_CONSOLE_SIGNED_OUT`](https://vitehub.dev/docs/cli/diagnostics/cli_console_signed_out) | There is no valid API key for \<console\>. The key is missing, expired, or revoked. |
| [`CLI_ENV_FILE_EXISTS`](https://vitehub.dev/docs/cli/diagnostics/cli_env_file_exists) | \<file\> exists. `vitehub env pull` does not replace a file without --yes. |
| [`CLI_ENV_FILE_NOT_IGNORED`](https://vitehub.dev/docs/cli/diagnostics/cli_env_file_not_ignored) | \<file\> is not in .gitignore, so the values could be committed. |
| [`CLI_ENV_PULL_FAILED`](https://vitehub.dev/docs/cli/diagnostics/cli_env_pull_failed) | The Console refused the pull (\<code\>). \<message\> |
| [`CLI_HOST_RESPONSE_INVALID`](https://vitehub.dev/docs/cli/diagnostics/cli_host_response_invalid) | The \<host\> API returned an unexpected response. |
| [`CLI_SETUP_FAILED`](https://vitehub.dev/docs/cli/diagnostics/cli_setup_failed) | See the page of the code. |
| [`CLI_UPDATE_INSTALL_FAILED`](https://vitehub.dev/docs/cli/diagnostics/cli_update_install_failed) | `<command>` exited with code \<exitCode\>. |
| [`CLI_UPDATE_NO_PACKAGES`](https://vitehub.dev/docs/cli/diagnostics/cli_update_no_packages) | No package.json in \<root\> or its workspace packages names `vite-hub` or an `@vite-hub/*` package with a version or a pkg.pr.new URL. |
| [`CLI_UPDATE_PACKAGE_MISSING`](https://vitehub.dev/docs/cli/diagnostics/cli_update_package_missing) | The project depends on \<packages\>, which \<target\> does not have. Nothing was changed. |
| [`CLI_UPDATE_REQUEST_FAILED`](https://vitehub.dev/docs/cli/diagnostics/cli_update_request_failed) | The request to \<url\> failed (\<status\>). Nothing was changed. |
| [`SETUP_CONFIG_MANUAL`](https://vitehub.dev/docs/cli/diagnostics/setup_config_manual) | ViteHub cannot edit the vitehub() options in \<file\> without running the config (\<reason\>). |
| [`SETUP_CONFIG_NOT_LITERAL`](https://vitehub.dev/docs/cli/diagnostics/setup_config_not_literal) | The vitehub() options in \<file\> cannot be read without running the config (\<reason\>). |
| [`SETUP_DEPLOY_BUILD_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_build_failed) | `<command>` exited with code \<exitCode\>. |
| [`SETUP_DEPLOY_CHECK_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_check_failed) | The app is deployed to \<url\>, but a `deploy.check` path did not answer with a 2xx status: \<failed\>. |
| [`SETUP_DEPLOY_CHECKOUT_CONFLICT`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_checkout_conflict) | A checkout folder of vitehub.lock has unresolved conflicts, so the Workspace push after the deploy would fail. Nothing was built or deployed: \<files\> |
| [`SETUP_DEPLOY_CHECKOUT_MODULE_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_checkout_module_failed) | The project installs \<specifier\>, but ViteHub cannot load it from \<file\>, so it cannot push the checkout folders of vitehub.lock. Nothing was built or deployed: \<message\> |
| [`SETUP_DEPLOY_COMMAND_REJECTED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_command_rejected) | The build output names a deploy command that ViteHub did not write, so it does not run it: \<command\> |
| [`SETUP_DEPLOY_CREDENTIALS_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_credentials_missing) | No \<host\> credentials were found in the environment or in the host CLI login. |
| [`SETUP_DEPLOY_D1_MIGRATIONS_PENDING`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_d1_migrations_pending) | The build has D1 migrations that the remote database of the binding \<binding\> has not applied: \<migrations\>. The new code would query tables or columns that do not exist yet. Nothing was deployed. |
| [`SETUP_DEPLOY_ENV_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_env_missing) | The app needs \<names\>, and no value was found. This is the first deploy to \<host\>: the project is not linked, so the host has no variables yet and every required name needs a local value for the \<stage\> stage. Nothing was deployed. |
| [`SETUP_DEPLOY_ENV_NOT_LINKED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_env_not_linked) | The \<host\> project is not linked, so deploy cannot set \<names\> before the first deploy. Nothing was deployed. |
| [`SETUP_DEPLOY_ENV_STAGE_UNSAFE`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_env_stage_unsafe) | These existing Cloudflare secrets have no local value for stage \<stage\>: \<names\>. The latest uploaded version may belong to another stage, so inheriting its values is unsafe. Nothing was deployed. |
| [`SETUP_DEPLOY_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_failed) | `<step>` failed\<value\>.\<value\> |
| [`SETUP_DEPLOY_HOST_MISMATCH`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_host_mismatch) | The build output is for \<built\>, but this deploy goes to \<host\>. |
| [`SETUP_DEPLOY_HOST_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_host_unsupported) | `vitehub deploy` has no upload for the \<host\> host. |
| [`SETUP_DEPLOY_ORG_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_org_required) | The Deno Deploy organization is not known. |
| [`SETUP_DEPLOY_OUTPUT_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_output_missing) | The build output has no \<file\>. |
| [`SETUP_DEPLOY_PREVIEW_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_preview_unsupported) | The \<host\> deploy that the build writes always deploys to production. |
| [`SETUP_DEPLOY_PROVISION_NEEDS_BUILD`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_provision_needs_build) | The deploy must create or change \<count\> resources, but --no-build deploys an output that was built without their ids. Nothing was created or deployed. |
| [`SETUP_DEPLOY_PROVISION_UNCHECKED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_provision_unchecked) | The deploy could not check the \<host\> resources of the app, so it created and deployed nothing: \<warnings\> \<missing\> |
| [`SETUP_DEPLOY_PUSH_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_push_failed) | The app is deployed to \<url\>, but the Workspace push failed: \<message\> |
| [`SETUP_DEPLOY_TEMPORARY_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_deploy_temporary_unsupported) | --temporary cannot run here. \<reason\> |
| [`SETUP_DEPLOYMENTS_ACCOUNT_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_deployments_account_required) | The \<host\> account of the linked project is not known. |
| [`SETUP_DEPLOYMENTS_CREDENTIALS_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_deployments_credentials_missing) | No \<host\> credentials were found in the environment or in the host CLI login, so the deployments cannot be read. |
| [`SETUP_DEPLOYMENTS_NOT_LINKED`](https://vitehub.dev/docs/cli/diagnostics/setup_deployments_not_linked) | The project has no \<host\> target in .vitehub/link.json, so the host project to read is not known. |
| [`SETUP_DEPLOYMENTS_PROJECT_ID_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_deployments_project_id_required) | The \<host\> link has no project id, and the \<host\> API lists deployments by id. |
| [`SETUP_ENV_DECRYPT_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_decrypt_failed) | \<key\> cannot decrypt \<name\> in \<file\> (\<reason\>). |
| [`SETUP_ENV_FILE_NOT_IGNORED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_file_not_ignored) | The secret \<names\> reads \<file\>, which git does not ignore, so a commit can add it. `vitehub env push` pushes a secret only from a file that git ignores. |
| [`SETUP_ENV_FILE_TRACKED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_file_tracked) | The secret \<names\> reads \<file\>, which git tracks, directly or through `$NAME` expansion or a symlink. `vitehub env push` does not push a secret that is in git. |
| [`SETUP_ENV_GIT_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_git_failed) | Git could not tell whether it tracks or ignores \<file\>, which holds a secret: \<reason\>. Nothing was pushed. |
| [`SETUP_ENV_KEYS_TRACKED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_keys_tracked) | \<file\> holds the private keys of the encrypted env files and is tracked by git. `vitehub env push` does not decrypt with a key that is in git. |
| [`SETUP_ENV_NAME_UNKNOWN`](https://vitehub.dev/docs/cli/diagnostics/setup_env_name_unknown) | The build output lists no variable named \<names\>. |
| [`SETUP_ENV_PRIVATE_KEY_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_env_private_key_missing) | \<file\> holds the encrypted \<names\>, and \<key\> is not set. |
| [`SETUP_ENV_STAGE_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_stage_unsupported) | The \<host\> host has no environment for the \<stage\> stage. |
| [`SETUP_ENV_VALUE_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_env_value_unsupported) | The value of \<name\> cannot go to \<host\> without a terminal prompt or argv. \<reason\> |
| [`SETUP_FEATURE_IMPLIED`](https://vitehub.dev/docs/cli/diagnostics/setup_feature_implied) | \<feature\> stays on because \<by\> turns it on. |
| [`SETUP_FEATURE_IN_USE`](https://vitehub.dev/docs/cli/diagnostics/setup_feature_in_use) | The app still uses \<features\>: \<references\> |
| [`SETUP_FEATURE_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_feature_required) | \<feature\> is required by the configured options of \<by\>. |
| [`SETUP_FEATURE_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_feature_unsupported) | \<feature\> is not supported on the \<host\> host. \<detail\> |
| [`SETUP_FILE_EXISTS`](https://vitehub.dev/docs/cli/diagnostics/setup_file_exists) | \<file\> already defines a \<definition\> Definition that conflicts with \<starter\>, so the build would reject both. |
| [`SETUP_GITHUB_REPOSITORY_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_github_repository_required) | The git remote origin (\<remote\>) is not a github.com repository. |
| [`SETUP_GITHUB_REQUEST_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_github_request_failed) | GitHub refused `<operation>`: \<reason\> |
| [`SETUP_INIT_DIR_NOT_EMPTY`](https://vitehub.dev/docs/cli/diagnostics/setup_init_dir_not_empty) | \<dir\> is not empty and holds no Vite or Nuxt app. ViteHub never overwrites a file. |
| [`SETUP_INIT_FRAMEWORK_MISMATCH`](https://vitehub.dev/docs/cli/diagnostics/setup_init_framework_mismatch) | \<dir\> holds a \<found\> app, not a \<framework\> app. |
| [`SETUP_INIT_HOST_MIGRATION`](https://vitehub.dev/docs/cli/diagnostics/setup_init_host_migration) | init cannot change an enabled ViteHub stack to the \<host\> host. |
| [`SETUP_INIT_NUXT_VERSION`](https://vitehub.dev/docs/cli/diagnostics/setup_init_nuxt_version) | \<dir\> does not declare a known Nuxt 5 version. ViteHub did not adopt it. |
| [`SETUP_INPUT_NEEDED`](https://vitehub.dev/docs/cli/diagnostics/setup_input_needed) | Set \<fields\> to add \<value\> on the \<host\> host. |
| [`SETUP_INSTALL_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_install_failed) | `<command>` exited with code \<exitCode\>. |
| [`SETUP_LINK_ACCOUNT_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_link_account_required) | The Cloudflare token has access to \<count\> accounts, so the account to link is not clear. |
| [`SETUP_LINK_CREDENTIALS_MISSING`](https://vitehub.dev/docs/cli/diagnostics/setup_link_credentials_missing) | No \<host\> credentials were found in the environment or in the host CLI login. |
| [`SETUP_LINK_HOST_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_link_host_required) | The project links several hosts (\<hosts\>) and none is the default, so the host is not clear. |
| [`SETUP_LINK_HOST_UNSUPPORTED`](https://vitehub.dev/docs/cli/diagnostics/setup_link_host_unsupported) | The \<host\> host has no project to link. A self-hosted Node server needs no link. |
| [`SETUP_LINK_NAME_REQUIRED`](https://vitehub.dev/docs/cli/diagnostics/setup_link_name_required) | The project name is not known. vitehub() has no literal `name` and package.json has no name. |
| [`SETUP_LINK_PROJECT_NOT_FOUND`](https://vitehub.dev/docs/cli/diagnostics/setup_link_project_not_found) | The \<host\> project \<project\> does not exist\<value\>. |
| [`SETUP_LOGS_OPTION_MOVED`](https://vitehub.dev/docs/cli/diagnostics/setup_logs_option_moved) | `observability.logs` is no longer a ViteHub option. |
| [`SETUP_NOT_A_PROJECT`](https://vitehub.dev/docs/cli/diagnostics/setup_not_a_project) | \<root\> has no package.json, vite.config, or nuxt.config file. |
| [`SETUP_PLAN_UNKNOWN`](https://vitehub.dev/docs/cli/diagnostics/setup_plan_unknown) | The dev server has no plan with this id. It was applied already, or the server restarted. |
| [`SETUP_SERVER_DIR_MANUAL`](https://vitehub.dev/docs/cli/diagnostics/setup_server_dir_manual) | ViteHub cannot determine the Nuxt application server directory without running the config. |
| [`SETUP_STALE_PLAN`](https://vitehub.dev/docs/cli/diagnostics/setup_stale_plan) | \<file\> changed after ViteHub planned the change. |
| [`SETUP_UNINSTALL_FAILED`](https://vitehub.dev/docs/cli/diagnostics/setup_uninstall_failed) | `<command>` exited with code \<exitCode\>. |

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

- [Start](https://vitehub.dev/raw/docs/cli.md)
- [Commands](https://vitehub.dev/raw/docs/cli/primitives.md)
- [Operate](https://vitehub.dev/raw/docs/cli/inspect.md)

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