File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,12 +86,14 @@ function Check-Node {
8686 try {
8787 $nodeVersion = (node - v 2> $null )
8888 if ($nodeVersion ) {
89- $version = [int ]($nodeVersion -replace ' v(\d+)\..*' , ' $1' )
90- if ($version -ge 22 ) {
89+ $versionMatch = [regex ]::Match($nodeVersion , ' ^v(?<major>\d+)\.(?<minor>\d+)\.' )
90+ $major = if ($versionMatch.Success ) { [int ]$versionMatch.Groups [" major" ].Value } else { 0 }
91+ $minor = if ($versionMatch.Success ) { [int ]$versionMatch.Groups [" minor" ].Value } else { 0 }
92+ if (($major -gt 22 ) -or (($major -eq 22 ) -and ($minor -ge 19 ))) {
9193 Write-Host " [OK] Node.js $nodeVersion found" - ForegroundColor Green
9294 return $true
9395 } else {
94- Write-Host " [!] Node.js $nodeVersion found, but v22+ required" - ForegroundColor Yellow
96+ Write-Host " [!] Node.js $nodeVersion found, but v22.19 + required" - ForegroundColor Yellow
9597 return $false
9698 }
9799 }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ NC='\033[0m' # No Color
1818DEFAULT_TAGLINE=" All your chats, one OpenClaw."
1919NODE_DEFAULT_MAJOR=24
2020NODE_MIN_MAJOR=22
21- NODE_MIN_MINOR=14
21+ NODE_MIN_MINOR=19
2222NODE_MIN_VERSION=" ${NODE_MIN_MAJOR} .${NODE_MIN_MINOR} "
2323
2424ORIGINAL_PATH=" ${PATH:- } "
You can’t perform that action at this time.
0 commit comments