From faac59fb8ee9b10bac60da1adbd17b6b0bc25073 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Thu, 21 Jul 2022 15:29:37 +0530 Subject: [PATCH] Fix TS errors and weird instances of undefined error due to prisma upgrade and turbo cache (#3475) * Fix TS errors * Always reexecute prisma postinstall as prisma version might change after yarn --- packages/lib/errors.ts | 2 +- turbo.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/lib/errors.ts b/packages/lib/errors.ts index 6bec1e8a50..4b8368dd9e 100644 --- a/packages/lib/errors.ts +++ b/packages/lib/errors.ts @@ -23,7 +23,7 @@ export function handleErrorsJson(response: Response) { export function handleErrorsRaw(response: Response) { if (response.status === 204) { - return {}; + return "{}"; } if (!response.ok && response.status < 200 && response.status >= 300) { response.text().then(console.log); diff --git a/turbo.json b/turbo.json index 981f9efc10..8008d03643 100644 --- a/turbo.json +++ b/turbo.json @@ -113,6 +113,9 @@ "outputs": ["../../node_modules/@prisma/client/**", "../../node_modules/@prisma/admin-client/**"], "inputs": ["./schema.prisma", "./prisma/schema.prisma"] }, + "@calcom/prisma#post-install": { + "cache": false + }, "start": {}, "embed-tests": { "cache": false