P
Prisma•3mo ago
FunSociety

I'm trying to use prisma prisma in remix (ERR_RESOLVE_PACKAGE_ENTRY_FAIL)

I tried this code to see if I saw the changes.
import db from "./db" // import your extended Prisma Client instance

async function main() {
const subscription = await db.usuario.subscribe()

for await (const event of subscription) {
console.log('New event:', event)
}
}

main()
import db from "./db" // import your extended Prisma Client instance

async function main() {
const subscription = await db.usuario.subscribe()

for await (const event of subscription) {
console.log('New event:', event)
}
}

main()
And it actually worked correctly, but when I try with remix when launching the project with npm run dev it gives me this error (Error: Failed to resolve entry for package "@prisma/extension-pulse". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@prisma/extension-pulse" package) This is my package.json
https://pastebin.com/aAw1FHwn
https://pastebin.com/aAw1FHwn
2 Replies
FunSociety
FunSociety•3mo ago
This remix have a vite implementation
Nurul
Nurul•3mo ago
Hey @FunSociety 👋 It looks like you tried to use Prisma Pulse on the frontend, which isn't supported. To propagate events to the frontend, you can use a WebSocket library like socket.io. https://www.prisma.io/docs/pulse/known-limitations#prisma-pulse-is-server-side Here are some example projects for your reference: https://www.prisma.io/docs/pulse/what-is-pulse#example-projects
Want results from more Discord servers?
Add your server