From ef61ec3c200c1cc16a75476abf90b649dbf9cc21 Mon Sep 17 00:00:00 2001 From: mARTin Date: Tue, 10 Mar 2026 15:27:28 +0100 Subject: [PATCH] fix: remove .next/server copy that breaks standalone middleware-manifest The standalone build already includes the correct server files. Copying .next/server on top was overwriting middleware-manifest.json, causing MODULE_NOT_FOUND errors at runtime. v1.22.1 --- package.json | 2 +- scripts/boot-update.sh | 3 +-- scripts/update-server.sh | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f797ab2..7f389f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.22.0", + "version": "1.22.1", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/scripts/boot-update.sh b/scripts/boot-update.sh index 9d6be79..710d868 100755 --- a/scripts/boot-update.sh +++ b/scripts/boot-update.sh @@ -53,11 +53,10 @@ if [ ! -d "$NEXT_DIR" ] || [ "$LOCAL" != "$REMOTE" ]; then log "Building application..." npm run build 2>&1 | tee -a "$LOG_FILE" - log "Preparing standalone directory (copying static, server assets and env)..." + log "Preparing standalone directory (copying static assets and env)..." cp -r public .next/standalone/ 2>&1 | tee -a "$LOG_FILE" mkdir -p .next/standalone/.next/static 2>&1 | tee -a "$LOG_FILE" cp -r .next/static .next/standalone/.next/ 2>&1 | tee -a "$LOG_FILE" - cp -r .next/server .next/standalone/.next/ 2>&1 | tee -a "$LOG_FILE" cp .env .next/standalone/ 2>/dev/null || true 2>&1 | tee -a "$LOG_FILE" fi diff --git a/scripts/update-server.sh b/scripts/update-server.sh index 9bb1c5a..f31751c 100755 --- a/scripts/update-server.sh +++ b/scripts/update-server.sh @@ -28,11 +28,10 @@ npx prisma generate echo -e "${YELLOW}[4/6] Building application...${NC}" npm run build -echo -e "${YELLOW}[5/6] Copying static + server assets to standalone...${NC}" +echo -e "${YELLOW}[5/6] Copying static assets to standalone...${NC}" cp -r public .next/standalone/ mkdir -p .next/standalone/.next/static cp -r .next/static .next/standalone/.next/ -cp -r .next/server .next/standalone/.next/ cp .env .next/standalone/ 2>/dev/null || true cp .env.local .next/standalone/ 2>/dev/null || true