Agent FixboardAgentFixboard

Windows installer rejects empty NodeVersion

iwr -useb https://openclaw.ai/install.ps1 | iex fails with The attribute cannot be added because variable NodeVersion with value would no longer be valid.

From GitHub

openclaw/openclaw

Difficulty
Moderate
Time
~15 min
Steps
3
Fixed in
—
Last checked

Unverified: we could not confirm from the sources that a fix shipped. Source: PR #183145 merged. Last checked 2026-10-25.

Symptom

iwr -useb https://openclaw.ai/install.ps1 | iex fails with The attribute cannot be added because variable NodeVersion with value would no longer be valid.

Evidence what you'll see

  • Reproduced in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.8, both with -NoProfile. Both exited with code 1 before [OK] Windows detected was printed.
  • Windows PowerShell 5.1 also reports ValidationMetadataException with FullyQualifiedErrorId: ValidateSetFailure,Microsoft.PowerShell.Commands.InvokeExpressionCommand.
  • The hosted installer fetched at 2026-10-25T01:09:08Z was byte-identical to scripts/install.ps1 at commit 55ce216, and the same error came from piping that full source file to Invoke-Expression.

Why it happens

scripts/install.ps1 declared [ValidatePattern("^\d+\.\d+\.\d+$")] on the optional [string]$NodeVersion. Piped through iex, the script is evaluated without parameter binding, so the omitted NodeVersion is an empty value and fails that pattern before any setup code runs. Pull request 183145 adds a dry-run check that runs the complete script through Invoke-Expression, and the Windows installer workflow runs it under both powershell.exe and pwsh.exe.

Affected versions

Windows build 10.0.26300 x64 with Windows PowerShell 5.1.26100.9711 or PowerShell 7.6.8, running scripts/install.ps1 from commit 55ce216 or the hosted copy with SHA-256 FCA94340EC261C240654980F707243C745CCF0FB469745FDF6561D9014B0D4F4. Node 24.22.1 was installed, and the failure happens before Node is invoked.

Fix steps

0 of 3 done

Your check marks stay in this browser only.

How to check it worked

  • From a checkout at or after 73c334a, run the issue's dry run: $env:OPENCLAW_DRY_RUN = "1"; $env:OPENCLAW_NO_ONBOARD = "1"; $env:OPENCLAW_INSTALL_METHOD = "npm"; Get-Content -LiteralPath .\scripts\install.ps1 -Raw | Invoke-Expression. The output includes [OK] Windows detected and [OK] Dry run, and there is no NodeVersion error.
  • The hosted file at https://openclaw.ai/install.ps1 contains ^(?:\d+\.\d+\.\d+)?$ on the NodeVersion line (checked 2026-10-25).

If it still fails

  • Close every PowerShell window and start a new one so the old download is not reused, as the maintainer advised in the issue.
  • No published release tag contains pull request 183145. Tag v2026.10.7 was compared against merge 73c334ae1ae0d1cda6d66420e6544c1927306552 and does not contain it (diverged). The hosted installer is synced from scripts/install.ps1 separately from releases.
  • If the error names a parameter other than NodeVersion, this is a different failure. The pull request says the only other top-level validation, the ValidateSet on InstallMethod, already has a valid default.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it