System requirements

The latest version of Prisma requires the following:

Minimum required version
Node.js12.6.X / 14.X
TypeScript (optional)4.1.X
Yarn (optional)1.19.2

Notes:

See also: Supported database versions

Troubleshooting

There are some common problems caused by using outdated versions of the system requirements:

Unable to build a TypeScript project with @prisma/client

Problem

You see the following error when you try type-checking a project after you run prisma generate.

$./node_modules/.prisma/client/index.d.ts:10:33
$Type error: Type expected.
$ 8 | export type PrismaPromise<A> = Promise<A> & {[prisma]: true}
$ 9 | type UnwrapTuple<Tuple extends readonly unknown[]> = {
$> 10 | [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise<infer X> ? X : never : never
$ | ^
$ 11 | };
$ 12 |
$ 13 |

Solution

Upgrade your project to TypeScript 4.1.X or later. npm install -D typescript.

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. npm install -D typescript.

Edit this page on GitHub