Skip to content

update-check hardcodes registry.npmjs.org, not respecting npm mirror config #79140

Description

@sixerLiu

Problem

The update checker in src/infra/update-channels.ts hardcodes https://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
  • ~/.npmrc configuration
  • any mirror settings

Expected behavior

The update checker should use the same registry as the package manager (respect npm config get registry or the $npm_config_registry environment variable).

Workaround

Manually patching update-check-*.js files in the pnpm store to replace registry.npmjs.org with a mirror URL — but this gets reverted on every update.

Suggested fix

In src/infra/update-channels.ts, read the registry URL from:

  1. process.env.npm_config_registry, or
  2. fall back to the hardcoded default only as last resort

Environment

  • openclaw version: 2026.5.3-1
  • pnpm global store: ~/.local/share/pnpm/global/5/.pnpm/
  • npm registry config: https://registry.npmmirror.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis 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.no-staleExclude from stale automation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions