-
Notifications
You must be signed in to change notification settings - Fork 2.1k
prisma generate fails in yarn2 / yarn3 workspaces #8765
Copy link
Copy link
Open
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: yarn workspaces
Description
Bug description
We are using prisma in a yarn2 monorepo consisting of multiple workspaces. We were on version 2.23.0 before and everything was working fine. After upgrading to 2.29.0, prisma tries to run npm to install @prisma/client, even though it's already installed in the current folder. This fails, as npm is unable to recognize the imported workspace.
yarn prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:core-api-plugins/article-import-edeka
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/valentinmorlock/.npm/_logs/2021-08-16T10_13_58_979Z-debug.log
Error: Command failed with exit code 1: npm install -D prisma@2.29.1How to reproduce
clone this repo: https://github.com/v-morlock/prisma-yarn2-repro
yarn
cd workspace
yarn prisma generate
Expected behavior
Prisma should generate its files
Prisma information
Environment & setup
- OS: macOS
- Database: mySQL
- Node.js version: 16.1.0
Prisma Version
2.29.1, stopped working on 2.26.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: yarn workspaces