Skip to content

pnpm install not running prisma generate #6603

@scriptcoded

Description

@scriptcoded

Bug description

When installing within a PNPM monorepo the generator isn't being run. I suspect it might have something to do with PNPM symlinking dependencies and therefore messing with the client postinstall script. Just a guess though.

How to reproduce

Reproduction: https://github.com/scriptcoded/prisma-issue-6603

  1. Make sure PNPM is installed. (https://pnpm.io/installation)
  2. Clone the reproduction repo: git clone [email protected]:scriptcoded/prisma-issue-6603.git
  3. Enter the app directory: cd prisma-issue-6603/app
  4. Install dependencies using PNPM: pnpm i
  5. Run the application: pnpx ts-node index.ts
  6. Observe that the Prisma client has not been generated

Expected behavior

The Prisma client should be generated and the application should run without issues.

Prisma information

Project set up accoring to the Start from scratch guide.

Environment & setup

  • OS: Manjaro Linux x86_64
  • Database: PostgreSQL 12
  • Node.js version: v14.15.2
  • Prisma version:
prisma               : 2.21.2
@prisma/client       : 2.21.2
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ../node_modules/.pnpm/@prisma+engines@2.21.0-36.e421996c87d5f3c8f7eeadd502d4ad402c89464d/node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ../node_modules/.pnpm/@prisma+engines@2.21.0-36.e421996c87d5f3c8f7eeadd502d4ad402c89464d/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ../node_modules/.pnpm/@prisma+engines@2.21.0-36.e421996c87d5f3c8f7eeadd502d4ad402c89464d/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt e421996c87d5f3c8f7eeadd502d4ad402c89464d (at ../node_modules/.pnpm/@prisma+engines@2.21.0-36.e421996c87d5f3c8f7eeadd502d4ad402c89464d/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : e421996c87d5f3c8f7eeadd502d4ad402c89464d
Studio               : 0.371.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions