Pulse import not recognized / types not working in Next.js project
Pulse is causing type issues when imported specifically inside of Next projects, hasn't happened for me in regular Node projects.
The code itself actually works when run, but it causes a litany of type errors because the .subscribe function isn't applied to the client's types.
To repro:
1. npx create-next-app@latest my-app
2. perform prisma quickstart steps with postgres, generate client
3. install pulse extension
4. attempt to create a typescript file (i made mine in /prisma/example.ts) and import pulse
Codesandbox example:
https://codesandbox.io/p/devbox/pulse-next-755wng
![No description](https://cdn.answeroverflow.com/1235256075155013752/image.png)
1 Reply
Hey @Joe, I ran into the same issue but this thread should help: https://discord.com/channels/937751382725886062/1224423957197754530
Basically, you need to add
customConditions
to your tsconfig