From cc6c93b2df3693af0caec56f1bfb792be6c7d50e Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Thu, 19 Mar 2026 04:33:27 +0000 Subject: [PATCH] fix(nextjs): break server-only import leak in constants.ts constants.ts re-exported STATUS from routing/index.ts, which pulled server-only modules (next/headers, server-only) into client bundles via the webpack module graph, breaking the Docker frontend-app build. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontends/nextjs/src/lib/constants.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontends/nextjs/src/lib/constants.ts b/frontends/nextjs/src/lib/constants.ts index cebc84a8d..450e76906 100644 --- a/frontends/nextjs/src/lib/constants.ts +++ b/frontends/nextjs/src/lib/constants.ts @@ -49,9 +49,18 @@ export const ENV_DEFAULTS = { /** * HTTP status codes - * Re-exported from routing for convenience + * Defined here directly to avoid pulling in routing's server-only dependencies. */ -export { STATUS } from '@/lib/routing' +export const STATUS = { + OK: 200, + CREATED: 201, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + ERROR: 500, + INTERNAL_ERROR: 500, +} as const /** * Session cookie name