mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
fix: move ajv to dependencies and auto-install deps in install scripts
`ajv` is required at runtime by the installer (`scripts/lib/install/config.js`) but was listed under `devDependencies`. This caused `Error: Cannot find module 'ajv'` when running `./install.sh` from a fresh git clone or via `npx`. - Move `ajv` from devDependencies to dependencies in package.json - Add auto `npm install` in install.sh when node_modules is missing - Add matching auto-install in install.ps1 for Windows parity
This commit is contained in:
parent
df4f2df297
commit
9c381b4469
3 changed files with 16 additions and 1 deletions
|
|
@ -34,5 +34,14 @@ while ($true) {
|
|||
$scriptDir = Split-Path -Parent $scriptPath
|
||||
$installerScript = Join-Path -Path (Join-Path -Path $scriptDir -ChildPath 'scripts') -ChildPath 'install-apply.js'
|
||||
|
||||
# Auto-install Node dependencies when running from a git clone
|
||||
$nodeModules = Join-Path -Path $scriptDir -ChildPath 'node_modules'
|
||||
if (-not (Test-Path -LiteralPath $nodeModules)) {
|
||||
Write-Host '[ECC] Installing dependencies...'
|
||||
Push-Location $scriptDir
|
||||
try { & npm install --no-audit --no-fund --loglevel=error }
|
||||
finally { Pop-Location }
|
||||
}
|
||||
|
||||
& node $installerScript @args
|
||||
exit $LASTEXITCODE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue