* 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>
5.5 KiB
id, title
| id | title |
|---|---|
| installation | Installation |
Prerequisites
If you don't use the standalone script or @pnpm/exe to install pnpm, then you need to have Node.js (at least v22) to be installed on your system.
Using a standalone script
You may install pnpm even if you don't have Node.js installed, using the following scripts.
On Windows
:::warning
Sometimes, Windows Defender may block our executable if you install pnpm this way.
Due to this issue, we currently recommend installing pnpm using npm on Windows.
:::
Using PowerShell:
$env:PNPM_VERSION="latest-11"; Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression
On Windows, Microsoft Defender can slow down installation of packages. You can add pnpm to Microsoft Defender's list of excluded folders in a PowerShell window with administrator rights by executing:
Add-MpPreference -ExclusionPath $(pnpm store path)
On POSIX systems
:::warning Not supported on Intel macOS and arm64 musl Linux
The standalone script and @pnpm/exe do not run on Intel Macs (darwin-x64) or on arm64 musl Linux, such as Alpine on ARM. Install the pnpm package, which runs on your system Node.js, with npm install -g pnpm@latest-11 instead. On arm64 musl Linux you can also use pnpm 12, which has a native binary for it. See #11423 and #10443 for context.
:::
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=latest-11 sh -
If you don't have curl installed, you would like to use wget:
wget -qO- https://get.pnpm.io/install.sh | env PNPM_VERSION=latest-11 sh -
:::info Linux runtime requirements
The install script picks a glibc or musl build based on your system's libc. A separate musl build is provided for Alpine and other musl-based distros on x64. The glibc build requires glibc 2.27 or newer plus libatomic.so.1. Both are present on most full distros but may be missing from minimal container images. If you see error while loading shared libraries: libatomic.so.1, install it with your distro's package manager:
- Debian/Ubuntu:
apt-get install -y libatomic1 - Fedora/RHEL:
dnf install -y libatomic
:::
:::tip
You may use the pnpm runtime command then to install Node.js.
:::
In a Docker container
# bash
wget -qO- https://get.pnpm.io/install.sh | env PNPM_VERSION=latest-11 ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -
# sh
wget -qO- https://get.pnpm.io/install.sh | env PNPM_VERSION=latest-11 ENV="$HOME/.shrc" SHELL="$(which sh)" sh -
# dash
wget -qO- https://get.pnpm.io/install.sh | env PNPM_VERSION=latest-11 ENV="$HOME/.dashrc" SHELL="$(which dash)" dash -
Installing a specific version
Before running the install script, you may optionally set an env variable PNPM_VERSION to install a specific version of pnpm:
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=<version> sh -
Using npm
npx get-pnpm latest-11
:::tip
Do you wanna use pnpm on CI servers? See: Continuous Integration.
:::
Compatibility
Here is a list of past pnpm versions with respective Node.js version support.
| Node.js | pnpm 8 | pnpm 9 | pnpm 10 | pnpm 11 |
|---|---|---|---|---|
| Node.js 14 | ❌ | ❌ | ❌ | ❌ |
| Node.js 16 | ✔️ | ❌ | ❌ | ❌ |
| Node.js 18 | ✔️ | ✔️ | ✔️ | ❌ |
| Node.js 20 | ✔️ | ✔️ | ✔️ | ❌ |
| Node.js 22 | ✔️ | ✔️ | ✔️ | ✔️ |
| Node.js 24 | ✔️ | ✔️ | ✔️ | ✔️ |
| Node.js 26 | ✔️ | ✔️ | ✔️ | ✔️ |
Troubleshooting
If pnpm is broken and you cannot fix it by reinstalling, you might need to remove it manually from the PATH.
Let's assume you have the following error when running pnpm install:
C:\src>pnpm install
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Users\Bence\AppData\Roaming\npm\pnpm-global\4\node_modules\pnpm\bin\pnpm.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
First, try to find the location of pnpm by running: which pnpm. If you're on Windows, run where.exe pnpm.*.
You'll get the location of the pnpm command, for instance:
$ which pnpm
/c/Program Files/nodejs/pnpm
Now that you know where the pnpm CLI is, open that directory and remove any pnpm-related files (pnpm.cmd, pnpx.cmd, pnpm, etc).
Once done, install pnpm again and it should work as expected.
Updating pnpm
To update to the newest pnpm 11, run the self-update command with the major:
pnpm self-update 11
A bare pnpm self-update follows npm's latest tag, which now points at pnpm
12. See Installing pnpm v12 if that
is what you want.
Uninstalling pnpm
If you need to remove the pnpm CLI from your system and any files it has written to your disk, see Uninstalling pnpm.