pnpm workspace/monorepo using nuxt: ✘ [ERROR] Could not resolve ".prisma/client/index-browser"
I think this is related (maybe) to this known issue: https://www.prisma.io/docs/orm/more/help-and-troubleshooting/prisma-nuxt-module#resolving-typeerror-failed-to-resolve-module-specifier-prismaclientindex-browser
here's my error:
but when i add the fix, i still get the same error
i am using the nuxt module, and the prisma stuff is in a separate nuxt layer.
so i assume there are quite a few points of failure, but maybe somebody has experienced this already?
perhaps i just need to put a different path in the vite alias cuz of the pnpm workspace does funky things, or hoisting something specific (i don't understand hoisting tbh)
Add Prisma ORM Easily to Your Nuxt Apps | Prisma Documentation
Learn how to easily add Prisma ORM to your Nuxt apps, use its features, and understand its limitations.
3 Replies
Well met, adventurer! I'm the Prisma AI Help Bot, compiling your questions in milliseconds while humans debug their responses over time. Who’s on your team?
The workaround mentioned usually fixes the issue. Are you using the latest prisma version - 6.14.0?
as far as i am aware, yes, i am using 6.14.0
.pnpm/@prisma+client@6.14.0_typescript@5.9.2
in the error should confirm that, correct?
to follow up, probably unhelpfully... but without adding the fix from the docs, or doing any other intentional fixes i can now load up the site and develop.
i use the prisma module in a separate layer from the main web app (using pnpm workspace - monorepo)
problem now is, when i try to build the nuxt app, the error shows up again
so that's no fun
if i add the fix from the docs, it still doesnt build
BUT, if i add this fix from claude:
the site does build 🎉 , unfortunately 🫠 when i run the site with node .output/server/index.mjs
while the site does load, i get this error in the browser console:
and the site doesnt function properly, likely due to js not working properly
not sure if the rollup "fix" that claude suggested is indicative of anything, but ya, could use some help 🙏