Prisma pulse TS error.

I installed prisma pulse extension in a new Next.js project. However, I am trying to set my prisma.ts file
import { PrismaClient } from "@prisma/client";
import { withPulse } from "@prisma/extension-pulse";

const prisma = new PrismaClient().$extends(
withPulse({
apiKey: process.env["PULSE_API_KEY"] as string,
})
);

export { prisma };
import { PrismaClient } from "@prisma/client";
import { withPulse } from "@prisma/extension-pulse";

const prisma = new PrismaClient().$extends(
withPulse({
apiKey: process.env["PULSE_API_KEY"] as string,
})
);

export { prisma };
But I am getting error:
Cannot find module '@prisma/extension-pulse' or its corresponding type declarations.ts(2307)
Tried clearing npm cache, uninstall and install the dependency, and removing and installing node_modules.
3 Replies
flawnson
flawnson7d ago
Can confirm that changing the import to import specifically the node version fixed the typescript issue.
Nurul
Nurul2d ago
I am glad to hear that! 🙏
Want results from more Discord servers?
Add your server