I am following the NestJs Prisma docs. I followed every step but I keep getting this error:
Cannot find module 'generated/prisma' or its corresponding type declarations.ts(2307) in this line: import { User as UserModel, Post as PostModel } from 'generated/prisma'; even though this is what the docs are using. The suggested import is from import { User as UserModel, Post as PostModel } from 'generated/prisma/client'; but when running the app I get another error:
Object.defineProperty(exports, "__esModule", { value: true });
^
ReferenceError: exports is not defined
at file:///D:/code/nestjs/nest-prisma/dist/generated/prisma/client.js:38:23
The only time it works is when I follow this prisma example. But this one does not create a prisma.config.ts nor does it provide a generator output like the nestjs docs shows, which as far as i understand will be mandatory from Prisma ORM version 7