Skip to content

Commit 846685e

Browse files
committed
fix(prisma): Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".
1 parent 31e3558 commit 846685e

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

apps/collabydraw/next.config.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@ const nextConfig: NextConfig = {
1717
// Ensure environment variables are always available
1818
config.plugins.push(
1919
new webpack.DefinePlugin({
20-
'process.env.JWT_SECRET': JSON.stringify(process.env.JWT_SECRET),
21-
'process.env.DATABASE_URL': JSON.stringify(process.env.DATABASE_URL),
20+
"process.env.JWT_SECRET": JSON.stringify(process.env.JWT_SECRET),
21+
"process.env.DATABASE_URL": JSON.stringify(process.env.DATABASE_URL),
2222
})
2323
);
24+
if (isServer) {
25+
config.externals = [
26+
...(config.externals || []),
27+
"prisma",
28+
"@prisma/client",
29+
];
30+
}
2431
return config;
25-
}
32+
},
2633
};
2734

2835
export default nextConfig;

packages/db/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/db/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
},
2121
"scripts": {
2222
"generate": "prisma generate",
23-
"test": "echo \"Error: no test specified\" && exit 1",
2423
"postinstall": "prisma generate"
2524
}
2625
}

turbo.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
"^check-types"
3636
]
3737
},
38+
"copy:prisma": {
39+
"cache": false
40+
},
3841
"dev": {
3942
"cache": false,
4043
"persistent": true

0 commit comments

Comments
 (0)