chore(node): proje Node 22'ye sabit — .npmrc use-node-version, engines, Dockerfile node:22-alpine
Some checks failed
Deploy / deploy (push) Has been cancelled

better-sqlite3 Node 22 (ABI 127) için derli; kabuktaki Node 20 ile npm run dev tüm
sayfaları ERR_DLOPEN_FAILED'a düşürüyordu. pnpm artık her komutu 22.21.1 ile koşar;
.npmrc Docker'a girmez (Alpine'de glibc Node indirtir), imaj kendi node:22'sini kullanır.
launch.json dev yapılandırmaları npm yerine pnpm. Lokal docker build + run doğrulandı.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
bilalgursen
2026-10-27 00:11:08 +03:00
parent 830b21199f
commit 42f9e483a6
6 changed files with 16 additions and 8 deletions

View File

@@ -3,20 +3,17 @@
"configurations": [
{
"name": "dev",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"run",
"dev"
],
"port": 3000
},
{
"name": "dev-3100",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"run",
"dev",
"--",
"-p",
"3100"
],

View File

@@ -5,6 +5,9 @@ node_modules
.agents
.claude
.mcp.json
# use-node-version Alpine'de pnpm'e glibc Node indirtir; imaj kendi Node 22'sini kullanır
.npmrc
.nvmrc
# Yalnızca kök dizindeki .md dosyaları (path ayracını geçmez);
# content/rehber/*.md build için gerekli, etkilenmez.
*.md

4
.npmrc Normal file
View File

@@ -0,0 +1,4 @@
# pnpm bu projede her komutu (dev, build, lint, tsx betikleri) kabuktaki Node'a
# bakmadan bu sürümle koşar; better-sqlite3 bu ABI (127) için derlidir.
# Docker'a girmez (.dockerignore): Alpine'de pnpm'in indirdiği glibc Node çalışmaz.
use-node-version=22.21.1

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM node:20-alpine AS base
FROM node:22-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable && corepack prepare pnpm@10.8.1 --activate
@@ -43,7 +43,7 @@ RUN --mount=type=cache,id=next-cache,target=/app/.next/cache \
RUN sh scripts/standalone-linkleri-onar.sh .next/standalone
# ── Çalıştırma katmanı ──
FROM node:20-alpine AS runner
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production

View File

@@ -2,6 +2,9 @@
"name": "kolaytercih",
"version": "2.5.2",
"private": true,
"engines": {
"node": ">=22"
},
"scripts": {
"dev": "next dev",
"build": "next build",