$ErrorActionPreference = 'Stop' $projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path $frontendDir = Join-Path $projectRoot 'frontend' if (-not (Test-Path (Join-Path $frontendDir 'package.json'))) { throw "Frontend package.json not found: $frontendDir\package.json" } Push-Location $frontendDir try { npm run dev -- --host 127.0.0.1 --port 5174 } finally { Pop-Location }