Fix RSC toStringTag error: import PrismaClient from generated TS client
Use @/generated/prisma/client instead of @prisma/client to avoid Turbopack creating a broken external proxy for the missing .prisma/client/default module at runtime. Add @prisma/adapter-pg to serverExternalPackages, remove unused resolveAlias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-8
@@ -3,14 +3,7 @@ import type { NextConfig } from "next";
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone",
|
||||
transpilePackages: ["unified", "remark-parse"],
|
||||
serverExternalPackages: ["@prisma/client", "pg"],
|
||||
experimental: {
|
||||
turbo: {
|
||||
resolveAlias: {
|
||||
".prisma/client/default": "./node_modules/.prisma/client/default.js",
|
||||
},
|
||||
},
|
||||
},
|
||||
serverExternalPackages: ["@prisma/client", "@prisma/adapter-pg", "pg"],
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import { PrismaClient } from "@/generated/prisma/client";
|
||||
import { PrismaPg } from "@prisma/adapter-pg";
|
||||
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
|
||||
Reference in New Issue
Block a user