Use pnpm with Pier
pnpm reads its registry config from .npmrc — the same file npm uses. Authentication semantics match npm (bearer on every request), so unlike yarn 1 you don’t need always-auth=true for pnpm to work.
Configure
Section titled “Configure”registry=https://YOUR-PIER-HOST/registry/npm///YOUR-PIER-HOST/registry/npm/:_authToken=pier_npm_…always-auth=truealways-auth=true is optional for pnpm — it’s harmless and recommended if you also use yarn 1 in the same project.
Install / add
Section titled “Install / add”pnpm installpnpm add left-padpnpm add @your-org/internal-libpnpm add -D typescript # devDependencyPublish
Section titled “Publish”pnpm publishpnpm publish --tag betapnpm publish --no-git-checks # skip the clean-tree check in CIWorkspaces
Section titled “Workspaces”For a pnpm workspace, put .npmrc at the workspace root — every package inherits it. No need to duplicate per package.
my-monorepo/├── .npmrc ← here├── package.json├── pnpm-workspace.yaml└── packages/ ├── app/package.json └── lib/package.jsonIf a single package needs a different registry, drop a .npmrc next to its package.json — pnpm uses the closest one walking up.
The .pnpm symlink farm
Section titled “The .pnpm symlink farm”When you list node_modules/ after a pnpm install, you’ll see node_modules/.pnpm/ containing the actual content-addressed store. Top-level deps are symlinks into it. This is intentional and doesn’t affect Pier — packages are still requested through the same HTTP API.
Versions matrix
Section titled “Versions matrix”| pnpm version | Status | Notes |
|---|---|---|
| 9 | ✓ | Works out of the box |
| 10 | ✓ | Works out of the box |
Pin via packageManager in package.json so corepack uses the right version:
{}Common errors
Section titled “Common errors”ERR_PNPM_FETCH_401— token revoked or missing. Mint a fresh one in Packages → Manage tokens.ERR_PNPM_FETCH_404— upstream proxy off + package not privately published. Toggle it on in Packages → Upstream proxy.ERR_PNPM_INTEGRITY_CHECK_FAILED— Pier-stored tarball got out of sync with its sha512. Rare; typically caused by manual FS edits. Solution:rm /opt/pier/data/registry/<pkg>/<file>.tgzand re-install (Pier will re-fetch with correct integrity).
Related
Section titled “Related”- Setup — base walkthrough.
- CI integration — pnpm in CI snippets.
- Troubleshooting — more error scenarios.