Files
pnpm/pnpm11/docs/cli/doctor.md
Zoltan KochanandClaude Opus 5.5 6f95957063 docs: lint prose with Vale (#17238)
* docs: lint prose with Vale

Add Vale with an in-repo style, .vale/styles/pnpm, that turns the
writing rules in AGENTS.md and the Google developer documentation style
guide into lint rules. The stock Vale packages (Google, Microsoft,
RedHat, write-good) were too noisy to block on, for example 1,300
passive-voice hits in the v12 docs alone, so the rules are written for
this repo, following the GitLab model. Each one links the guideline it
enforces.

Levels:
- error, fails CI: dashes, plain-word substitutions, condescending
  words, "please", "note that", hedges, puffery, optional plurals,
  exclamation marks, ellipses, curly quotes, generic link text, product
  spellings, sentence-case headings, repeated words, double spaces,
  implementation history in comments; in changesets, bold or italic
  emphasis, internal names and release-line names.
- warning: future tense, sentences over 30 words, "instead of" and
  "so that" tails in changesets.
- suggestion: passive voice.

.vale.ini scopes the rules. Docs get every rule. Contributor Markdown
and code comments keep dashes and headings as warnings until their
roughly 8,100 em dashes are rewritten. Released changesets stay in
.changeset/ and are not rewritten, so lint-prose.mjs lints only the
changesets added since PROSE_BASE (the PR base in CI).

The prose workflow installs a pinned, checksum-verified Vale release and
runs `pnpm lint:prose`. The rest of this change rewrites the existing
docs, READMEs, contributor Markdown, and code comments to pass the
error-level rules. Only prose and comment text changed. Renamed
headings keep their anchors.

Spelling stays with cspell, which checks identifiers that Vale does not
see.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: keep prose lint from flattening meaning

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:48:09 +02:00

3.2 KiB

id, title
id title
doctor pnpm doctor

Added in: v11.14.0

Runs diagnostics on the pnpm installation and the environment it runs in.

pnpm doctor [--offline] [--benchmark] [--json]

Each check reports how to fix what it finds, and the command exits with a non-zero code when any check fails. Warnings do not fail the command.

✓ Versions: pnpm 11.14.0, Node.js 22.20.0
✓ Install method: pnpm
✓ Global bin directory: /Users/example/Library/pnpm/bin
✓ Cache directory: /Users/example/Library/Caches/pnpm
✓ Store directory: /Users/example/Library/pnpm/store/v10
✓ Filesystem: available: reflink, hardlink, symlink
✓ Registry connectivity: https://registry.npmjs.org/ (128ms)
✓ Install smoke test: offline "file:" install linked its dependency

All checks passed

Checks

Versions

Reports the running pnpm and Node.js versions.

Install method

Reports how pnpm was installed (as the pnpm package or the @pnpm/exe standalone build) and warns when pnpm is being run by Corepack, which manages the pnpm version itself and makes pnpm self-update unavailable.

Global bin directory

Checks that the directory pnpm links global executables into is on PATH and writable. If it is missing from PATH, the fix is to run pnpm setup.

Cache directory

Checks that the cache directory is writable.

Store directory

Checks that the store directory is writable. Skipped when no store directory is configured.

Filesystem

Probes which link strategies work from the store's volume: reflink (copy-on-write), hardlink, and symlink. This is what determines how packages land in node_modules and how fast an install is. A reflink or hardlink is near-free, a plain copy is not.

If neither reflink nor hardlink works, the check warns that installs will fall back to copying, and suggests putting the store on the same filesystem as your projects.

Registry connectivity

Pings the configured registry with a 15-second timeout and reports the round-trip time. Fails if the registry cannot be reached or answers with an error status, which usually points at network, proxy, or auth configuration.

Since v11.28.0, the check pings the configured default registry and sends the credentials configured for it. Before, it always pinged https://registry.npmjs.org/.

Skipped with --offline.

Install smoke test

Installs a throwaway package as a file: dependency, entirely offline, in a temporary directory. This exercises the resolve, store, and link path end to end and confirms the running binary can actually perform an install.

This check is always offline by construction, so --offline does not skip it.

Options

--offline

Skip the checks that need network access.

--benchmark

Also time the filesystem and install checks, reporting the duration alongside each result.

--json

Report the results as JSON. The output is an object with a single checks array, each entry having title, status (pass, warn, or fail), and optionally detail, fix, and durationMs.

{
  "checks": [
    {
      "title": "Filesystem",
      "status": "pass",
      "detail": "available: reflink, hardlink, symlink",
      "durationMs": 3
    }
  ]
}