diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7fdc11b..e839adf 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -194,21 +194,14 @@ jobs: if: env.HAS_NODE == 'true' uses: actions/setup-node@v4 with: - node-version: "lts/*" + # Keep CI on Node 20 to match runtime/Docker and better-sqlite3 compatibility. + node-version: "20.x" - name: Install Node dependencies if: env.HAS_NODE == 'true' run: | - # Prefer deterministic install when lockfile is healthy. - # Fallback to npm install if lockfile is out-of-sync. - if [ -f package-lock.json ]; then - if ! npm ci; then - echo "npm ci failed; falling back to npm install" - npm install - fi - else - npm install - fi + # Lockfile is currently not authoritative; use install to refresh dependency tree. + npm install # ----------------------------------------------------------------------- # Step 9: Node.js — Lint (only if "lint" script exists in package.json) diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/package.json b/package.json index 53b9d37..05ac601 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,9 @@ "name": "cozy-den", "type": "module", "version": "0.0.1", + "engines": { + "node": ">=20 <24" + }, "scripts": { "dev": "astro dev", "start": "astro dev",