Skip to content

Production nuxt build is faulty when using nuxt-prisma with pnpm, frontend logic crashes out #86

@wjdp

Description

@wjdp

I'm using pnpm which may compound this problem

I have installed this package and done the following extra items as described in the Prisma docs

  • Added hoist-pattern[]=*prisma* to .npmrc
  • Added a vite resolve alias as per the linked doc

I now have working API routes and a working frontend when running in dev mode, however when running in production mode I'm getting the following which causes my frontend logic to brick:

Image

Clicking through Qg seems to be related to the prisma client.

Image

I'm not importing the prisma client on the frontend pages at all. Why is it being loaded and why is it crashing out those pages?

Here is the current state of my repo https://github.com/wjdp/grate/tree/b7dd02dd354e48cb4286e9f606ca9cef59869440

When I say the frontend is bricked, this very simple page stops working: https://github.com/wjdp/grate/blob/b7dd02dd354e48cb4286e9f606ca9cef59869440/pages/state.vue

Browing through this repos issues there seems to be a handful of similar problems but none that exactly match this one, hence opening a new issue.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions