From ab7b2fa6f4f8fe548872269f92bd71d00229446c Mon Sep 17 00:00:00 2001 From: KuchtaVR6 Date: Mon, 19 Oct 2026 19:37:21 +0100 Subject: [PATCH 1/2] fix: upgrade Node to 24 so the Docker build works with sharp 0.35 sharp 0.35.5 requires Node >=20.9.0, so the node:18-alpine image failed to load the linuxmusl-arm64 binary and the production build broke. Move the image and both CI workflows to Node 24 (current Active LTS), raise the engines floor to the version sharp actually needs, and declare packageManager to silence the corepack warning. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/security-audit.yml | 2 +- .github/workflows/typecheck.yml | 2 +- Dockerfile | 2 +- package.json | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index bf9a105..88a3745 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '24' - name: Setup pnpm uses: pnpm/action-setup@v4 diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index c070f1b..6b87442 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '24' - name: Setup pnpm uses: pnpm/action-setup@v4 diff --git a/Dockerfile b/Dockerfile index 81f36a4..ae81e2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine AS base +FROM node:24-alpine AS base RUN apk add --no-cache libc6-compat RUN corepack enable && corepack prepare pnpm@10.30.1 --activate diff --git a/package.json b/package.json index 0fcd18c..72fee49 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "new_portfolio", "version": "0.1.0", "private": true, + "packageManager": "pnpm@10.30.1", "scripts": { "dev": "next dev -p 4000", "build": "next build", @@ -40,7 +41,7 @@ "sass": "^1.105.2" }, "engines": { - "node": ">=18.0.0", + "node": ">=20.9.0", "pnpm": ">=8.0.0" }, "pnpm": { -- 2.54.0 From 9c597cbc80861180cfa6900d628b3d5aeaf5eb1e Mon Sep 17 00:00:00 2001 From: KuchtaVR6 Date: Mon, 19 Oct 2026 19:39:16 +0100 Subject: [PATCH 2/2] fix: install pnpm via corepack in CI pnpm/action-setup's self-installer fails on Node 24 ("Running self-installer..." exits 1), breaking both workflows. Use corepack instead, which picks up the pnpm version from the packageManager field and matches how the Dockerfile installs it. Also move upload-artifact to v4, since v3 is retired. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/security-audit.yml | 6 ++---- .github/workflows/typecheck.yml | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index 88a3745..7d25f40 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -29,9 +29,7 @@ jobs: node-version: '24' - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 + run: corepack enable - name: Get pnpm store directory shell: bash @@ -60,7 +58,7 @@ jobs: run: pnpm outdated || true - name: Upload security report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: security-report diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 6b87442..2a0a128 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -27,9 +27,7 @@ jobs: node-version: '24' - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 + run: corepack enable - name: Get pnpm store directory shell: bash -- 2.54.0