Files
workspace/verify-openclaw-node.ps1
aitest 15c4480db1 Add OpenClaw workspace configuration and tools
- Add agent configuration files (AGENTS.md, USER.md, IDENTITY.md, SOUL.md)
- Add git configuration and skills management scripts
- Add frontend/backend analysis tools and reports
- Add DingTalk media sender utilities and documentation
- Fix OpenClaw runtime environment (Node.js and Python)
- Configure git remotes and push scripts
2026-03-05 13:56:59 +09:00

43 lines
1.8 KiB
PowerShell

# 验证OpenClaw Node配置脚本
Write-Host "=== OpenClaw Node配置检查 ===" -ForegroundColor Green
# 1. 检查gateway.cmd中的Node路径
Write-Host "`n1. Gateway.cmd中的Node路径:" -ForegroundColor Cyan
$gatewayCmd = Get-Content C:\Users\ALC\.openclaw\gateway.cmd
$nodeLine = $gatewayCmd | Select-String -Pattern "node.exe" -Context 0,0
Write-Host $nodeLine
# 2. 检查当前运行的Node进程
Write-Host "`n2. 当前OpenClaw Node进程:" -ForegroundColor Cyan
$nodeProcess = Get-Process -Name "node" -ErrorAction SilentlyContinue | Where-Object { $_.Path -like "*openclaw-runtime*" }
if ($nodeProcess) {
Write-Host "进程ID: $($nodeProcess.Id)"
Write-Host "路径: $($nodeProcess.Path)"
Write-Host "启动时间: $($nodeProcess.StartTime)"
Write-Host "版本信息:"
& $nodeProcess.Path --version
} else {
Write-Host "没有找到使用openclaw-runtime的Node进程" -ForegroundColor Yellow
}
# 3. 检查OpenClaw运行时目录
Write-Host "`n3. OpenClaw运行时Node版本:" -ForegroundColor Cyan
if (Test-Path "F:\openclaw-runtime\node-v24.14.0-win-x64\node.exe") {
& "F:\openclaw-runtime\node-v24.14.0-win-x64\node.exe" --version
} else {
Write-Host "OpenClaw运行时Node未找到" -ForegroundColor Red
}
# 4. 检查NVM配置
Write-Host "`n4. NVM配置检查:" -ForegroundColor Cyan
Write-Host "NVM_HOME: $env:NVM_HOME"
Write-Host "NVM_SYMLINK: $env:NVM_SYMLINK"
# 5. 结论
Write-Host "`n=== 结论 ===" -ForegroundColor Green
Write-Host "✓ OpenClaw Gateway.cmd使用硬编码路径: F:\openclaw-runtime\node-v24.14.0-win-x64\node.exe" -ForegroundColor Green
Write-Host "✓ 不受PATH环境影响" -ForegroundColor Green
Write-Host "✓ 不受NVM切换影响" -ForegroundColor Green
Write-Host "✓ 始终使用Node v24.14.0" -ForegroundColor Green