Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated types #17152

Closed
Navigator12 opened this issue Jan 5, 2023 · 1 comment
Closed

Duplicated types #17152

Navigator12 opened this issue Jan 5, 2023 · 1 comment
Labels
kind/bug A reported bug.

Comments

@Navigator12
Copy link

Navigator12 commented Jan 5, 2023

Bug description

I recieve two duplicated types which conflicts with each other and don't allow me to compile project. These errors appeared after update to 4.8.0.

Here are my errors

node_modules/.prisma/client/index.d.ts:1909:15 - error TS2300: Duplicate identifier 'DistributorSubscriptionArgs'.

1909 export type DistributorSubscriptionArgs = {
~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/.prisma/client/index.d.ts:1932:15 - error TS2300: Duplicate identifier 'DistributorSubscriptionBillingsArgs'.

1932 export type DistributorSubscriptionBillingsArgs = {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/.prisma/client/index.d.ts:2929:15 - error TS2300: Duplicate identifier 'DistributorSubscriptionBillingsArgs'.

2929 export type DistributorSubscriptionBillingsArgs = {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/.prisma/client/index.d.ts:2952:15 - error TS2300: Duplicate identifier 'DistributorSubscriptionArgs'.

2952 export type DistributorSubscriptionArgs = {
~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/.prisma/client/index.d.ts:3930:15 - error TS2300: Duplicate identifier 'DistributorSubscriptionBillingsArgs'.

3930 export type DistributorSubscriptionBillingsArgs = {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 5 errors in the same file, starting at: node_modules/.prisma/client/index.d.ts:1909

How to reproduce

  1. Use the schema provided in the issue
  2. Run prisma migrate dev or prisma db push
  3. Try to build the project by running tsc

Expected behavior

Project should compile successfully

Prisma information

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl"]
previewFeatures = ["orderByNulls", "filteredRelationCount", "extendedWhereUnique"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Distributor {
id String @id @default(uuid())
subscription DistributorSubscription[]
subscriptionBillings DistributorSubscriptionBillings[]
}

model DistributorSubscription {
id String @id @default(uuid())
distributorId String
distributor Distributor @relation(fields: [distributorId], references: [id], onDelete: Cascade)
billings DistributorSubscriptionBillings[]
}

model DistributorSubscriptionBillings {
id String @id @default(uuid())
distributorId String
distributor Distributor @relation(fields: [distributorId], references: [id], onDelete: Cascade)
distributorSubscriptionId String
distributorSubscription DistributorSubscription @relation(fields: [distributorSubscriptionId], references: [id], onDelete: Cascade)
}

Environment & setup

  • OS: Ubuntu
  • Database: PostgreSQL
  • Node.js version: 16.14.2
  • ts config
    {
    "compilerOptions": {
    "target": "es2016",
    "module": "commonjs",
    "esModuleInterop": true,
    "moduleResolution": "node",
    "sourceMap": true,
    "outDir": "./dist"
    },
    "exclude": [
    "node_modules"
    ]
    }

Prisma Version

prisma                  : 4.8.0
@prisma/client          : 4.8.0
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe
Default Engines Hash    : d6e67a83f971b175a593ccc12e15c4a757f93ffe
Studio                  : 0.479.0
Preview Features        : orderByNulls, filteredRelationCount, extendedWhereUnique
@Navigator12 Navigator12 added the kind/bug A reported bug. label Jan 5, 2023
@SevInf
Copy link
Contributor

SevInf commented Jan 5, 2023

Duplicate of #17005.
This is fixed in 4.8.1

@SevInf SevInf closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

2 participants