From e69f93800bf2fccabe8d299b964cf3bb7fd3d1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 12 Apr 2026 14:00:00 +0200 Subject: [PATCH] Fix TypeScript parameter property crash in Node strip-only mode oauth.server.ts used a TypeScript parameter property (`public code: string` in constructor) which is not supported by Node.js v25's strip-only TypeScript mode. This caused the journal to crash-loop on startup after seeding OAuth clients. Also enable `erasableSyntaxOnly` in tsconfig.base.json so `pnpm typecheck` catches any future use of non-erasable TypeScript syntax. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/journal/app/lib/oauth.server.ts | 7 +++---- tsconfig.base.json | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/journal/app/lib/oauth.server.ts b/apps/journal/app/lib/oauth.server.ts index 539c6a3..a4c8c30 100644 --- a/apps/journal/app/lib/oauth.server.ts +++ b/apps/journal/app/lib/oauth.server.ts @@ -264,10 +264,9 @@ export async function getAuthenticatedUser(request: Request) { // --- Error type --- export class OAuthError extends Error { - constructor( - public code: string, - message: string, - ) { + code: string; + constructor(code: string, message: string) { super(message); + this.code = code; } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 9166196..3257189 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -17,6 +17,7 @@ "noUncheckedIndexedAccess": true, "noUncheckedSideEffectImports": false, "noEmit": true, + "erasableSyntaxOnly": true, "allowImportingTsExtensions": true }, "exclude": ["node_modules", "build", "dist"]