question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GroupByOutputType make 'count'. I also have 'count'. -> type error

See original GitHub issue

Hi Prisma Team!

Bug description

I’m trying to upgrade prisma 2.19.0 to 2.21.2. Every GroupByOutputType has count. My model also has count. When I try ‘tsc’, I got a type error about duplicate names. Screen Shot 2021-04-22 at 10 38 07 AM Screen Shot 2021-04-22 at 10 38 27 AM

How to reproduce

❯ rm -rf node_modules/ && npm i && tsc

Expected behavior

Should I change the name of count to solve this type error?

Prisma information

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "debian-openssl-1.1.x"]
}

model MarketProductGroup {
  id                 String          @id @default(cuid())
  count              Int?            @default(0)
  orderCount         Int?            @default(0)
  marketProductCount Int?            @default(0)
  deletedAt          DateTime?
  createdAt          DateTime        @default(now())
  updatedAt          DateTime        @updatedAt
}

Environment & setup

  • OS: Mac OS
  • Database: MySQL
  • Node.js version: v14.5.0
  • Prisma version: 2.21.2

@prisma/client: 2.21.2 nexus-plugin-prisma: 0.34.1 prisma: 2.21.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
janpiocommented, Apr 23, 2021

No worries, we totally prefer a 1000 duplicate issues to not having issues at all 👍 @SeonghuiChoe

2reactions
janpiocommented, Apr 23, 2021

Similar bug: https://github.com/prisma/prisma/issues/6344 Correct @SeonghuiChoe? This one is in the current sprint to be looked at.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python pandas error when doing groupby counts
If I turn it into a Series using df.groupby(['b', 'c'])['a'].count() it still doesn't work. Also notice that ...
Read more >
How to Use Pandas GroupBy, Counts and Value Counts - Kite
In this post, you'll learn how to use Pandas groupby, counts, and value_counts on your Pandas DataFrames for fast and powerful data ...
Read more >
Pandas GroupBy - Count the occurrences of each combination
In this article, we will GroupBy two columns and count the occurrences of each combination in Pandas. DataFrame. groupby() method is used to ......
Read more >
7 Common GROUP BY Errors - LearnSQL.com
COUNT (distinct author) gives us the number of distinct authors for each category, which is not the same as COUNT(*) .
Read more >
Pandas groupby() and count() with Examples
It works with non-floating type data as well. The below example does the grouping on Courses column and calculates count how many times...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found