System requirements

The latest version of Prisma requires the following:

Minimum required version
Node.js10.X
TypeScript4.1.X

See also: Supported database versions

Troubleshooting

Unable to use groupBy preview feature

Problem

You see the following console error when you attempt to run an app that uses the groupBy feature:

$server.ts:6:25 - error TS2615: Type of property 'OR' circularly references itself in mapped type '{ [K in keyof { AND?: Enumerable<ProductScalarWhereWithAggregatesInput>; OR?: Enumerable<ProductScalarWhereWithAggregatesInput>; ... 4 more ...; category?: string | StringWithAggregatesFilter; }]: Or<...> extends 1 ? { ...; }[K] extends infer TK ? GetHavingFields<...> : never : {} extends FieldPaths<...> ? never : K...'.
$6 const grouped = await prisma.product.groupBy({
$ ~~~~~~~~~~~~~~~~~~~~~~~~
$7 by: ['category']
$ ~~~~~~~~~~~~~~~~~~~~
$8 });
$ ~~~~
$server.ts:6:48 - error TS2554: Expected 0 arguments, but got 1.
$6 const grouped = await prisma.product.groupBy({
$ ~
$7 by: ['category']
$ ~~~~~~~~~~~~~~~~~~~~
$8 });
$ ~~~

Solution

Upgrade your project to TypeScript 4.1.X or later.

Edit this page on GitHub