prisma / nuxt-prisma

Prisma ORM integration for Nuxt
https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/prisma-nuxt-module
65 stars 12 forks source link

Package manager cannot get resolved when using Nuxt Layers #29

Open Dobefu opened 2 months ago

Dobefu commented 2 months ago

This is a continuation of #20. I'll provide a summary of the issue:

When using Nuxt layers and Node/PNPM workspaces, no lockfiles will be present in the directory of the Nuxt layer. This causes nuxt-prisma to fall back to npm. This becomes a problem when using pnpm and its workspaces functionality, since npm has no idea what the heck it should do.

I imagine the solution be twofold:

  1. Look at the actual project root for the lockfiles
  2. Throw a warning when the package manager falls back to npm, since something is not right at that point

I have a reproduction repository here: https://github.com/Dobefu/nuxt-prisma-pnpm-workspaces

Also, I intend to write a fix for this, but I'll have some lunch first. 🥪 <- This is what my lunch will look like

ankur-arch commented 2 months ago

Thanks @Dobefu! We should consider closing #31 while working on this.