vercel doctor
The vercel doctor command checks your Vercel CLI setup and shows how to fix each problem it finds. It doesn't need a login or a linked project, and it never prompts, logs in, or links a project. You and your coding agents can run it before debugging an error.
vercel doctorUsing the vercel doctor command to check your Vercel CLI setup.
The command runs these checks:
| Check | What it checks |
|---|---|
| CLI version | Whether a newer version of Vercel CLI is available |
| CLI install | How Vercel CLI was installed, and whether vercel upgrade can update it |
| Installs on PATH | Whether your PATH has more than one Vercel CLI install, in which case vercel runs the first one |
| Login | Whether you're logged in, and whether your token is valid |
| Team | Which team commands use, and whether you can access it |
| Project | Whether the current directory is linked to a project that still exists |
| vercel.json | Whether the vercel.json file in the current directory is valid |
| Vercel status | Whether the Vercel status page reports active incidents |
Each check reports OK, Warning, Failed, or Skipped. A check that needs a login is skipped and says why. When the current directory isn't linked, the Project check reports Warning and suggests vercel link. After the results, the command lists next steps with the exact command to run for each problem that has one.
The command exits with code 0 when the checks run, even if some of them fail.
These are options that only apply to the vercel doctor command.
The --json option prints the results as JSON. Each check includes its id, status, message, and the next commands that fix it, and summary counts the checks by status:
vercel doctor --jsonUsing the vercel doctor command with the --json option to read the
results in a script or coding agent.
To list only the checks that failed:
vercel doctor --json | jq -r '.checks[] | select(.status == "failed") | .id'Filtering the JSON output for the IDs of failed checks.
The following global options can be passed when using the vercel doctor command:
For more information on global options and their usage, refer to the options section.
Was this helpful?