Skip to content

Windows installer cannot repair stale Winget Node registrations #112051

Description

@ooiuuii

Summary

The Windows installer cannot recover when Winget still records the Node.js package but the installed node.exe is missing or unusable.

Real environment observed

  • Current openclaw/openclaw main
  • Windows scripts/install.ps1 Node bootstrap path
  • Winget exit code 0x8A15002B (-1978335189, no applicable upgrade)

User-visible symptom

OpenClaw setup invokes Winget, Winget reports that no upgrade applies, and the installer then still cannot find a supported Node runtime. Re-running setup repeats the same result because the stale package registration is never repaired.

Source-level reproduction on current main

The Winget branch runs one normal install command, refreshes PATH, and returns failure when Check-Node remains false. It does not inspect Winget's no-applicable-upgrade exit code and has no forced repair path.

A PowerShell regression fixture using the real Install-Node function reproduces this state by returning -1978335189 on the first Winget call while Check-Node remains false.

Expected behavior

When Winget reports no applicable upgrade but Node is still unavailable, the installer should make one bounded forced repair attempt and verify the resulting runtime before reporting success.

Actual behavior

The installer exits the Winget branch without attempting to repair the stale registration.

Scope / non-goals

Only the specific stale-registration exit code should trigger --force. Network failures, source errors, and other Winget failures must retain the existing non-forced failure behavior. The retry must remain bounded to one attempt.

Proposed fix

Capture Winget's exit code before later commands overwrite it. If Node remains unavailable and the exit code is -1978335189, retry once with --force, refresh discovery paths, and run the existing Node validation again.

Live searches for stale Winget Node registrations, forced Node repair, and 0x8A15002B found no matching open or closed issue or PR before filing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions