-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
update-check hardcodes registry.npmjs.org, not respecting npm mirror config #79140
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Type
Fields
Priority
None yet
Problem
The update checker in
src/infra/update-channels.tshardcodeshttps://registry.npmjs.org/openclaw/...and does not respect the user's npm registry configuration (e.g.,registry.npmmirror.com).This causes fetch timeouts in regions with poor connectivity to the official npm registry.
Current behavior
When checking for updates, the gateway always fetches from
https://registry.npmjs.org, ignoring:npm config get registry~/.npmrcconfigurationExpected behavior
The update checker should use the same registry as the package manager (respect
npm config get registryor the$npm_config_registryenvironment variable).Workaround
Manually patching
update-check-*.jsfiles in the pnpm store to replaceregistry.npmjs.orgwith a mirror URL — but this gets reverted on every update.Suggested fix
In
src/infra/update-channels.ts, read the registry URL from:process.env.npm_config_registry, orEnvironment
~/.local/share/pnpm/global/5/.pnpm/https://registry.npmmirror.com