You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] pnpm β₯ 11 ignores ${VAR} in a project .npmrc_authToken; the documented CI recipe silently sends no authΒ #1847
registry/tokens.mdx ("Using tokens in CI") and the Quick Start pnpm tab recommend committing a project-level .npmrc that references the token through an environment variable:
pnpm 11 stopped expanding environment variables in registry credential values read from a project-level.npmrc (pnpm 11 changelog: "Stopped expanding environment variables in ... registry credential values from .npmrc"). Reproduced against a local logging registry with //127.0.0.1:4899/acme/npm/:_authToken=${VLT_TOKEN} in the project .npmrc:
key dropped silently, request sent unauthenticated β 401
Literal tokens in a project .npmrc are still accepted, which is why the reporting user ended up generating an .npmrc with the raw token in CI before every install β the opposite of what the docs intend.
Working alternatives verified on pnpm 12.4:
user-level ~/.npmrc with //registry.vlt.io/acme/npm/:_authToken=${VLT_TOKEN} (env expansion still works at user level);
npm_config_//registry.vlt.io/acme/npm/:_authToken=<token> as an env var (pnpm's own changelog warns that GitHub Actions / bash cannot set env names containing /, : or ., so this is awkward in practice);
PNPM_CONFIG_NPMRC_AUTH_FILE=<path> pointing at a non-committed auth file;
pnpm_config__auth (JSON) is pnpm's intended CI mechanism but its exact shape needs to be confirmed against pnpm docs before we recommend it.
npm 11 still expands ${VAR} in a project .npmrc (and sends the literal string Bearer ${VLT_TOKEN} when the var is unset, which is a separate foot-gun worth a sentence).
Proposed change
In tokens.mdx and the Quick Start pnpm tab:
state that the ${VAR} form in a committed project .npmrc works for npm but not for pnpm β₯ 11;
give pnpm users a working CI recipe (user-level .npmrc written by the CI job, or PNPM_CONFIG_NPMRC_AUTH_FILE);
warn against committing / generating literal tokens in the project .npmrc.
Source: end-user feedback triage of a pnpm monorepo migration to registry.vlt.io (2026-09-11).
Activity
docs: fix registry migration and CI auth guidance (vltpkg#1961)