Today's Trends
minorInvestigatingNode.jsv8.0.0-rc.29 and later

Prisma 8 Contract Emission Fails Inside Bun/Turborepo Monorepos

  1. Investigating(current)
  2. Trending(upcoming)
  3. Workaround available(upcoming)
  4. Resolved(upcoming)

Executive summary

A bug in Prisma 8 contract generation causes a failure when running inside a Turborepo monorepo using the Bun runtime. The error message is 'CLI.INIT_EMIT_FAILED Cannot use 'in' operator to search for 'kind' in typeChoice'. This issue affects users of Prisma 8.0.0-rc.29 and later versions.

No verified workaround yet

None of the linked reports describe a mitigation. Follow this incident to hear when one appears.

Official fix
Technical root cause

Under active investigation. No report has identified a root cause yet.

Evidence

2 reports · 2 GitHubShow
  1. [1]
    GitHub First report
    Prisma 8 contract emit fails inside Bun/Turborepo monorepos with Cannot use 'in' operator to search for 'kind' in typeChoice(opens GitHub issue in a new tab)

    Package and version prisma: 8.0.0-rc.29 @prisma/cli-engine: 0.9.0 @prisma/orm-postgres: 8.0.0-rc.22 @prisma/orm-toolchain: 8.0.0-rc.21 and 8.0.0-rc.22 were initially present in the dependency tree. What happened? Running Prisma 8 contract generation inside a Turborepo monorepo using Bun workspaces fails with the following error: CLI.INIT_EMIT_FAILED Cannot use 'in' operator to search for 'kind' in typeChoice The issue occurs when running: bunx prisma contract emit I tested the same Prisma…

    by AKJ-5284 0upvotes 4comments

  2. [2]
    GitHub
    Prisma 8 contract emit fails inside Bun/Turborepo monorepos with Cannot use 'in' operator to search for 'kind' in typeChoice(opens GitHub issue in a new tab)

    Prisma 8 contract emit fails inside Turborepo monorepo due to conflicting ORM toolchain versions Description I'm encountering an issue when running Prisma 8 contract generation inside a Turborepo monorepo using npm workspaces. Running npx prisma contract emit results in the following error: CLI.INIT_EMIT_FAILED Cannot use 'in' operator to search for 'kind' in typeChoice The same Prisma configuration works correctly in a standalone project. The issue only occurs inside the monorepo. Environment…

    by gaurav9949 0upvotes 3comments97% match

Timeline

  1. First report on GitHub issue

    Prisma 8 contract emit fails inside Bun/Turborepo monorepos with Cannot use 'in' operator to search for 'kind' in typeChoice

    Source