Skip to content

Commit a892a25

Browse files
Garfield-yinclaude
andcommitted
fix: make the lockfile installable outside a China mirror
pnpm-lock.yaml had 383 tarball URLs pointing at registry.npmmirror.com, picked up from the registry configured on the machine that generated it. GitHub's runners cannot reach that host, so every CI job died in `pnpm install` with a wall of 502s — and so would any contributor outside that network. Regenerating against the public registry produces a lockfile with no registry URLs at all: pnpm's v9 format records integrity hashes and leaves the source to configuration, which is what makes it portable. A project .npmrc pins the public registry so a global mirror cannot leak back in. Using a mirror locally no longer requires touching the lockfile: npm_config_registry=https://your-mirror/ pnpm install --no-frozen-lockfile Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent bea760b commit a892a25

2 files changed

Lines changed: 390 additions & 398 deletions

File tree

.npmrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Pin the public registry so the lockfile resolves for everyone, including CI.
2+
# A mirror configured globally would otherwise bake its own URLs into
3+
# pnpm-lock.yaml and break installs outside that network.
4+
# To use a mirror locally without touching the lockfile:
5+
# npm_config_registry=https://your-mirror/ pnpm install --no-frozen-lockfile
6+
registry=https://registry.npmjs.org/

0 commit comments

Comments
 (0)