Skip to content

Commit 4ed0901

Browse files
authored
fix: prisma client binary cannot be found on vercel (#23772)
1 parent dbbf3ae commit 4ed0901

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

apps/api/v1/next.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const { withAxiom } = require("next-axiom");
22
const { withSentryConfig } = require("@sentry/nextjs");
3+
const { PrismaPlugin } = require("@prisma/nextjs-monorepo-workaround-plugin");
34

45
const plugins = [withAxiom];
56

@@ -14,6 +15,12 @@ const nextConfig = {
1415
"@calcom/prisma",
1516
"@calcom/trpc",
1617
],
18+
webpack: (config, { isServer }) => {
19+
if (isServer) {
20+
config.plugins = [...config.plugins, new PrismaPlugin()];
21+
}
22+
return config;
23+
},
1724
async headers() {
1825
return [
1926
{

apps/api/v1/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@calcom/lib": "*",
3131
"@calcom/prisma": "*",
3232
"@calcom/trpc": "*",
33+
"@prisma/nextjs-monorepo-workaround-plugin": "^6.16.1",
3334
"@sentry/nextjs": "^9.15.0",
3435
"bcryptjs": "^2.4.3",
3536
"memory-cache": "^0.2.0",

apps/web/next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require("dotenv").config({ path: "../../.env" });
22
const englishTranslation = require("./public/static/locales/en/common.json");
33
const { withAxiom } = require("next-axiom");
44
const { version } = require("./package.json");
5+
const { PrismaPlugin } = require("@prisma/nextjs-monorepo-workaround-plugin");
56
const {
67
i18n: { locales },
78
} = require("./next-i18next.config");
@@ -254,6 +255,8 @@ const nextConfig = (phase) => {
254255
})
255256
);
256257

258+
config.plugins = [...config.plugins, new PrismaPlugin()];
259+
257260
config.externals.push("formidable");
258261
}
259262

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@hookform/resolvers": "^2.9.7",
6060
"@next-auth/prisma-adapter": "^1.0.4",
6161
"@next/bundle-analyzer": "^15.5.2",
62+
"@prisma/nextjs-monorepo-workaround-plugin": "^6.16.1",
6263
"@radix-ui/react-avatar": "^1.0.4",
6364
"@radix-ui/react-collapsible": "^1.0.0",
6465
"@radix-ui/react-dialog": "^1.0.4",

yarn.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,7 @@ __metadata:
28022802
"@calcom/trpc": "*"
28032803
"@calcom/tsconfig": "*"
28042804
"@calcom/types": "*"
2805+
"@prisma/nextjs-monorepo-workaround-plugin": ^6.16.1
28052806
"@sentry/nextjs": ^9.15.0
28062807
bcryptjs: ^2.4.3
28072808
memory-cache: ^0.2.0
@@ -4251,6 +4252,7 @@ __metadata:
42514252
"@next-auth/prisma-adapter": ^1.0.4
42524253
"@next/bundle-analyzer": ^15.5.2
42534254
"@playwright/test": ^1.45.3
4255+
"@prisma/nextjs-monorepo-workaround-plugin": ^6.16.1
42544256
"@radix-ui/react-avatar": ^1.0.4
42554257
"@radix-ui/react-collapsible": ^1.0.0
42564258
"@radix-ui/react-dialog": ^1.0.4
@@ -11733,6 +11735,13 @@ __metadata:
1173311735
languageName: node
1173411736
linkType: hard
1173511737

11738+
"@prisma/nextjs-monorepo-workaround-plugin@npm:^6.16.1":
11739+
version: 6.16.1
11740+
resolution: "@prisma/nextjs-monorepo-workaround-plugin@npm:6.16.1"
11741+
checksum: df29824e2e420b50e707ea3af765a3b8a4d8be15af876adc1f177e7ad44d5d8fc968b2ba50f117196772bb5e6c28d50c49a3d4004c20a00fef6a26f2782366d0
11742+
languageName: node
11743+
linkType: hard
11744+
1173611745
"@prisma/prisma-schema-wasm@npm:5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2":
1173711746
version: 5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2
1173811747
resolution: "@prisma/prisma-schema-wasm@npm:5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2"

0 commit comments

Comments
 (0)