notiz-dev / nestjs-prisma Goto Github PK
View Code? Open in Web Editor NEWEasy Prisma support for your NestJS application
Home Page: https://nestjs-prisma.dev
License: MIT License
Easy Prisma support for your NestJS application
Home Page: https://nestjs-prisma.dev
License: MIT License
Prisma release with in version 4.7.0 Prisma Client Extensions (Preview)
This should be possible with the new CustomPrismaModule
/CustomPrismaService
(#40) where you can need to provide a PrismaClient
instance.
Right now it's only possible to use this module with express, it would be great to have the ability to use all this with fastify since most of the source code would be the same.
WARN Issues with peer dependencies found
.
├─┬ nestjs-prisma 0.18.0
│ ├── ✕ missing peer @nestjs/platform-express@"^7.0.0 || ^8.0.0 || ^9.0.0"
├─┬ @nestjs/testing 8.4.6
│ └── ✕ missing peer @nestjs/platform-express@^8.0.0
└─┬ @nestjs/core 8.4.6
└── ✕ missing peer @nestjs/platform-express@^8.0.0
Peer dependencies that should be installed:
@nestjs/platform-express@">=8.0.0 <9.0.0"
When I opened the package in NPM it lacked a link to GitHub.
Solution is here #49 (comment).
Hi, I used PrismaModule.forRootAsync
to set up my database URL. But it can't work when I ran prisma db pull
in console. Should I still keep a .env
file in my directory?
Executing nest add nestjs-prisma
in a Nest application using the latest version 9 returns following error:
nest add nestjs-prisma
▹▹▹▹▹ Package installation in progress... ☕
Failed to execute command: npm install --save nestjs-prisma@latest
✖ Package installation in progress... ☕
Unable to install library nestjs-prisma because package did not install. Please check package name.
after installing show this msg
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
Hello there,
Why I got this error? can I use another package manager like yarn for install the package? because installing 'nestjs-prisma' using other package manager it's normal
nestjs version: 8.2.1
PS C:\Users\richoandika\nestjs> nest add nestjs-prisma
✔ Package installation in progress... ☕
Starting library setup...
Error: Collection "nestjs-prisma" cannot be resolved.
at NodeModulesEngineHost.resolve (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\tools\node-module-engine-host.js:75:19)
at NodeModulesEngineHost._resolveCollectionPath (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\tools\node-module-engine-host.js:80:37)
at NodeModulesEngineHost.createCollectionDescription (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\tools\file-system-engine-host-base.js:118:27)
at SchematicEngine._createCollectionDescription (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\src\engine\engine.js:162:40)
at SchematicEngine.createCollection (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\src\engine\engine.js:155:43)
at NodeWorkflow.execute (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics\src\workflow\base.js:101:41)
at main (C:\Users\richoandika\tmp\nestjs\jam\node_modules\@angular-devkit\schematics-cli\bin\schematics.js:260:14)
at Object.<anonymous> (C:\Users\richoandika\nestjs\node_modules\@angular-devkit\schematics-cli\bin\schematics.js:370:5)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
Failed to execute command: node nestjs-prisma:nest-add --sourceRoot="src" C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\@nestjs\cli\bin\nest.js add nestjs-prisma
nest add nestjs-prisma
✔ Package installation in progress... ☕
Starting library setup...
Error: Collection "nestjs-prisma" cannot be resolved.
Failed to execute command: node nestjs-prisma:nest-add --source-root="src" C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules@nestjs\cli\bin\nest.js add nestjs-prisma
Errors coming using PrismaClientExceptionFilter at global level. Disable the use and all works well.
Error: TypeError: Right-hand side of 'instanceof' is not an object at is InstanceOf (node_modules/@nestjs/core/exceptions/exceptions-handler.js:28:54)
Following code is activated in request that causes the issue.
throw new BadRequestException({
description: 'Insufficient Credential Details',
status: HttpStatus.BAD_REQUEST,
});
Before upgrade to prisma 4.14.0, this worked well..!! nestjs-prisma is 0.20.0
Hi Guys, i try example fastify from this library
and connect with my database, my service only like this :
users() {
return this.prisma.users.findFirstOrThrow({
where: { user_id: 'My User Id' },
});
}
but reponse still throw error 500
{
"statusCode": 500,
"message": "Internal server error"
}
For our use case, we don't need to customize the PrismaService
. Can this package provide simple importable PrismaService
and PrismaModule
?
Is there a way to reach the underlying PrismaClient
instance for using prismaClient.$use
method or is there any other way to manipulate custom middlewares?
Hello, in this page I cannot see some text: https://nestjs-prisma.dev/docs/exception-filter/
hello
I can't find way to handle emit type: 'event'.
thank you
PrismaModule.forRoot({
isGlobal: true,
prismaServiceOptions: {
// middlewares: [loggingMiddleware()],
prismaOptions: {
log: [
{ emit: 'stdout', level: 'query' },
{ emit: 'stdout', level: 'info' },
{ emit: 'stdout', level: 'warn' },
{ emit: 'stdout', level: 'error' },
],
},
},
}),
prisma:query BEGIN
[start:dev] prisma:query INSERT INTO team_seas
.user
(id
,name
,email
,password
,role
) VALUES (?,?,?,?,?)
After updating to latest version 4.14.0 of prisma, the following error is coming. nestjs-prisma is 0.20.0
Error: Argument of type '"error"' is not assignable to parameter of type '"beforeExit"'
The error is only while using nestjs-prisma (PrismaService or CustomPrismaService)
In the above screenshot, you can see all option tried. The prisma1 is created directly and works.
Do guide further...
I got error response.status(...).json is not a function
in PrismaClientExceptionFilter if I use FastifyAdapter as my app. How about compatible with fastify?
Current angular schematics v13 are working fine with Nest applications v8 and v9.
"@angular-devkit/core": "^13.3.0",
"@angular-devkit/schematics": "^13.3.0",
"@schematics/angular": "~13.3.0"
Updating to angular v14 still works fine with Nest v9, but applications with v8 are failing.
"@angular-devkit/core": "^14.0.6",
"@angular-devkit/schematics": "^14.0.6",
"@schematics/angular": "~14.0.6"
Error logs for installing nest add [email protected]
in a Nest v8 app:
nest add [email protected]
✔ Package installation in progress... ☕
Starting library setup...
? Which datasource provider do you want to use for `prisma init`? sqlite
? Do you like to Dockerize your application? (Supports postgresql and mysql) No
✅️ Added prisma@latest
TypeError: this.host.readText is not a function
at new JSONFile (nest-8-prisma/node_modules/@schematics/angular/utility/json-file.js:17:34)
at addPackageJsonDependency (nest-8-prisma/node_modules/@schematics/angular/utility/dependencies.js:27:18)
at nest-8-prisma/node_modules/nestjs-prisma/schematics/nestjs-prisma/index.js:40:57
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
✅️ Added @prisma/client@latest
Hi,
I think, there is no problem with the following packages moving into devDependencies. Rather, so it can be made with zero-dependency. What do you think?
Lines 39 to 43 in 1be6f3b
Today i tried to use this with new Prisma 5.0.0 and i noticed this error:
Error: "beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.
at _t.on (/home/user/api/node_modules/@prisma/client/runtime/library.js:103:1990)
at Proxy.$on (/home/user/api/node_modules/@prisma/client/runtime/library.js:126:5397)
at Proxy.enableShutdownHooks (/home/user/api/node_modules/nestjs-prisma/lib/prisma.service.ts:42:10)
at bootstrap (/home/user/api/src/main.ts:13:23)
which points to `main::bootstrap` function:
// enable shutdown hook
const prismaService: PrismaService = app.get(PrismaService);
await prismaService.enableShutdownHooks(app);
According to nestjs module naming community guidelines, it's propper to return a global module by method forRoot
.
Hi
I want the service to always extends a specific extension I use
Currently I have to do something like this:
export const prismaClient = globalClient.$extends(
fieldEncryptionExtension()
)
Is there a way to do this with this package?
Hi,
On my project I need to open 2 postgresql connections (1 master, 1 read replica for analytics). I can't figure how to give a custom name when I instantiate a PrismaModule
that allow me to inject PrismaService
with the specified name.
I need something like :
whatever.module.ts
@Module({
imports: [
PrismaModule.forRootAsync({
name: 'ANALYTICS_DATABASE'
...
whatever.service.js
@Injectable()
export class WhateverService {
@Inject("ANALYTICS_DATABASE")
private readonly prismaAnalytics!: PrismaService;
...
Is that possible with your implementation ?
Thank you in advance
Hello there,
nestjs-prisma error filter is handling only PrismaClientKnownRequestError
Handling other client error types such as :
PrismaClientInitializationError
PrismaClientRustPanicError
PrismaClientUnknownRequestError
PrismaClientValidationError
do you want me to raise PR for this issue :)
I have an issue with monorepo using npm workspaces and prisma. The set up is there are two microservices that both use prisma (say packages/api1, packages/api2). If the same version of prisma is used in each, npm will create https://github.com/prisma in the root node_modules. The generated .prisma files are installed as a sibling to https://github.com/prisma, so api1 and api2 can clobber each other. One can specify where to generate the files (https://www.prisma.io/docs/concepts/components/prisma-client/working-with-prismaclient/generating-prisma-client#using-a-custom-output-path), however, nestjs uses @prisma/client to import, so the new location is ignored.
Does this package handle the shutdown hooks as described in the nest docs?
I can't find it when looking at the source code but maybe the documentation is outdated.
I am using graphql and whenever I get any error (duplicate key, not found, ...) I get the following:
{
"data": {},
"errors": [
{
"message": "response.status is not a function",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"userCreate"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"stacktrace": [
"TypeError: response.status is not a function",
" at ExpressAdapter.reply (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\@nestjs\\platform-express\\adapters\\express-adapter.js:28:22)",
" at PrismaClientExceptionFilter.catch (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\@nestjs\\core\\exceptions\\base-exception-filter.js:28:28)",
" at PrismaClientExceptionFilter.catchClientKnownRequestError (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\nestjs-prisma\\lib\\prisma-client-exception.filter.ts:88:16)",
" at PrismaClientExceptionFilter.catch (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\nestjs-prisma\\lib\\prisma-client-exception.filter.ts:69:19)",
" at ExternalExceptionsHandler.invokeCustomFilters (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\@nestjs\\core\\exceptions\\external-exceptions-handler.js:34:32)",
" at ExternalExceptionsHandler.next (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\@nestjs\\core\\exceptions\\external-exceptions-handler.js:13:29)",
" at Object.userCreate (C:\\Users\\Ryan\\Documents\\Projects\\Rhyno\\nest-rhyno-v2\\node_modules\\@nestjs\\core\\helpers\\external-proxy.js:14:42)"
]
}
}
]
}
I tried adding the filter by using APP_FILTER
in my app.module.ts
and also by using app.useGlobalFilters(new PrismaClientExceptionFilter(httpAdapter));
Hi there
Prisma is phasing out middleware. Any plan to deprecate middleware and provide extensions examples?
⠴ Installing packages (npm)...npm ERR! Cannot read properties of null (reading 'matches')
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/GWAPOKO/.npm/_logs/2023-01-19T07_57_49_031Z-debug-0.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Failed to execute command: node nestjs-prisma:nest-add --source-root="src" /Users/GWAPOKO/.nvm/versions/node/v18.12.0/bin/node /Users/GWAPOKO/Library/pnpm/global/5/node_modules/@nestjs/cli/bin/nest.js add nestjs-prisma
When using in http mode, PrismaExceptionFilter uses text/html content type instead of application/json.
I inspected the source code and found the cause:
https://github.com/notiz-dev/nestjs-prisma/blob/main/lib/prisma-client-exception.filter.ts#L95
Also why doesn't it throw HttpException and instead writes the response directly?
i am getting error when i am configure PrismaClientExceptionFilter in app.module.ts
[Nest] 32200 - 01/02/2023, 11:14:18 LOG [NestFactory] Starting Nest application...
[Nest] 32200 - 01/02/2023, 11:14:18 LOG [InstanceLoader] PrismaModule dependencies initialized +76ms
[Nest] 32200 - 01/02/2023, 11:14:18 ERROR [ExceptionHandler] Nest can't resolve dependencies of the PrismaClientExceptionFilter (?, Object). Please make sure that the argument Object at index [0] is available in the AppModule context.
Potential solutions:
Error: Nest can't resolve dependencies of the PrismaClientExceptionFilter (?, Object). Please make sure that the argument Object at index [0] is available in the AppModule context.
Potential solutions:
providers: [
{
provide: APP_FILTER,
useClass: PrismaClientExceptionFilter,
},
AppService,
],
Hi,
for the demo purpose I need to log queries fully like it's shown in this approach: prisma/prisma#5026 (comment).
How to do that?
On my opinion something like this should work:
import { NestFactory } from '@nestjs/core'
import { PrismaService } from 'nestjs-prisma'
import { AppModule } from '@/app.module'
async function bootstrap() {
const app = await NestFactory.create(AppModule)
const prismaService = app.get(PrismaService)
await prismaService.onModuleInit()
prismaService.$on('query', e => {
console.log(e)
})
await app.listen(config.get('server.port'))
}
bootstrap()
It does not give any typescript error (PrismaService extends PrismaClient) but it does not log anything.
Hi, there is a way i can excecute query inside a middleware or how to call prismaService inside the middleware?
nest add nestjs-prisma
▹▹▹▹▸ Package installation in progress... ☕
Failed to execute command: npm install --save nestjs-prisma@latest
✖ Package installation in progress... ☕
Unable to install library nestjs-prisma because package did not install. Please check package name.
npm install nestjs-prisma
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR! @nestjs/common@"^10.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^7.0.0 || ^8.0.0 || ^9.0.0" from [email protected]
npm ERR! node_modules/nestjs-prisma
npm ERR! nestjs-prisma@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
### When will nestjs 10 be supported?
Hi!
Is it possible to specify a different client (and therefore allow usage of multiple prisma clients)? I have two different schemata generating each into a separate directory using output
in my schema.prisma
-files:
generator client {
provider = "prisma-client-js"
output = "prisma/client1"
// output = "prisma/client2"
}
I need to import those by addresing e.g.
import { PrismaClient } from '../prisma/client1';
It seems as if PrismaClient import within nestjs-prisma is directly tied to import { PrismaClient } from '@prisma/client';
, which was ok if I use the default output. Is there any way to handle this more flexible?
Thanks in advance!
when I remove the PrismaService
from the app.module.ts
the error message changes to:
Nest could not find PrismaService element (this provider does not exist in the current context)
This is true because I inject a custom Prisma service into my services. The code that causes this is in the main.ts
file because of the shutdown hook.
import { PrismaService } from 'nestjs-prisma';
...
const prismaService: PrismaService = app.get(PrismaService);
await prismaService.enableShutdownHooks(app);
This seems an essential part to me but whenever I remove these two lines the error is gone and it all seems to work! Yay! But I still need to figure out how to put this shutdown hook back without destroying my apps.
Hello,
I tried installing with the updated version of Nestjs but it failed.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR! @nestjs/common@"^10.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^7.0.0 || ^8.0.0 || ^9.0.0" from [email protected]
npm ERR! node_modules/nestjs-prisma
npm ERR! nestjs-prisma@"*" from the root project
Hi,
I'm getting the following error:
Nest can't resolve dependencies of the PrismaClientExceptionFilter (?, Object). Please make sure that the argument Object at index [0] is available in the AppModule context.
It happens when i try to use PrismaClientExceptionFilter
provider, exactly like in the documentation.
My main.ts
file:
import { HttpAdapterHost, NestFactory } from '@nestjs/core';
import { PrismaClientExceptionFilter, PrismaService } from 'nestjs-prisma';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const { httpAdapter } = app.get(HttpAdapterHost);
app.useGlobalFilters(new PrismaClientExceptionFilter(httpAdapter));
const prismaService: PrismaService = app.get(PrismaService);
prismaService.enableShutdownHooks(app);
await app.listen(process.env.PORT);
}
bootstrap();
My app.module.ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { WorkspaceModule } from './workspace/workspace.module';
import { AuthModule } from './auth/auth.module';
import { PrismaClientExceptionFilter, PrismaModule } from 'nestjs-prisma';
import { APP_FILTER } from '@nestjs/core';
@Module({
imports: [
AuthModule,
WorkspaceModule,
PrismaModule.forRoot(),
],
controllers: [AppController],
providers: [
AppService,
{
provide: APP_FILTER,
useClass: PrismaClientExceptionFilter,
},
],
})
export class AppModule {}
Complete error message:
[Nest] 8849 - 09/15/2022, 9:12:02 PM ERROR [ExceptionHandler] Nest can't resolve dependencies of the PrismaClientExceptionFilter (?, Object). Please make sure that the argument Object at index [0] is available in the AppModule context.
Potential solutions:
- If Object is a provider, is it part of the current AppModule?
- If Object is exported from a separate @Module, is that module imported within AppModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
Error: Nest can't resolve dependencies of the PrismaClientExceptionFilter (?, Object). Please make sure that the argument Object at index [0] is available in the AppModule context.
Potential solutions:
- If Object is a provider, is it part of the current AppModule?
- If Object is exported from a separate @Module, is that module imported within AppModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
at Injector.lookupComponentInParentModules (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:241:19)
at Injector.resolveComponentInstance (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:194:33)
at resolveParam (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:116:38)
at async Promise.all (index 0)
at Injector.resolveConstructorParams (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:131:27)
at Injector.loadInstance (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:57:13)
at Injector.loadProvider (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/injector.js:84:9)
at async Promise.all (index 4)
at InstanceLoader.createInstancesOfProviders (/home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/instance-loader.js:47:9)
at /home/kelvenrubalaine/Documents/projects/liberty-backend/node_modules/@nestjs/core/injector/instance-loader.js:32:13
Someone help me?
Hi, starting from 0.19.0, I found that support for prisma@3 was broken when using PrismaClientExceptionFilter
.
0.19.0 introduced a new error type. But in prisma@3 there is no such error type. Thus, @Catch(...)
is invoked with an undefined parameter. This leads to an app crash from Nestjs, because it doesn't anticipate an undefined parameter.
Here's a minimum reproduction code(based on a basic example from this repo, but using prisma@3). Simply call GET http://localhost:3000, and the app will crash, instead of responding with an error.
You docker-compose.yml file includes an official postgres:12 image that needs some environment variables (see Environment Variables chapter on dockerhub Postgres page)
Environments provided by nestjs-prisma schematics nestjs-prisma/schematics/nestjs-prisma/templates/docker/.env
is incorrect:
POSTGRESQL_USER=prisma
POSTGRESQL_PASSWORD=topsecret
POSTGRES_DB=food
DATABASE_URL=postgresql://prisma:topsecret@postgresprisma:5432/food?schema=food&sslmode=prefer
must bee:
POSTGRES_USER=prisma
POSTGRES_PASSWORD=topsecret
POSTGRES_DB=food
DATABASE_URL=postgresql://prisma:topsecret@postgresprisma:5432/food?schema=food&sslmode=prefer
Also prisma 0.2.7 support dotenv-expand (see docs) which allows us to make the following improvement:
POSTGRES_USER=prisma
POSTGRES_PASSWORD=topsecret
POSTGRES_DB=food
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresprisma:5432/${POSTGRES_DB}?schema=food&sslmode=prefer
Does it support 2 clients?
Like described in this issue prisma/prisma#2443 (comment)
The current PrismaClientExceptionFilter
is not compatible with GraphQL.
Improve the filter to support GraphQL as well, more infos in the docs https://docs.nestjs.com/graphql/other-features#exception-filters
I'm using a custom prisma client, and for some reason I'm getting TypeScript errors. They appear to be related to the prisma client type not matching the type in the package.
Here's my custom prisma module:
CustomPrismaModule.forRootAsync({
name: 'PrismaService',
useFactory: () => prismaClient,
isGlobal: true,
}),
My custom prisma client:
import { PrismaClient } from '@prisma/database';
import { userSubscriptionIsActiveModelExtension, userSubscriptionIsActiveResultExtension } from './extensions';
export const prismaClient = new PrismaClient(
process.env.NODE_ENV !== 'dev'
? {
datasources: {
db: {
url: process.env.DATABASE_URL,
},
},
}
: undefined,
)
.$extends(userSubscriptionIsActiveResultExtension)
.$extends(userSubscriptionIsActiveModelExtension);
export type ExtendedPrismaClient = typeof prismaClient;
And here's the error:
Property '$on' is missing in type 'DynamicClientExtensionThis<TypeMap<Args & { result: { userSubscription: { isActive: () => { needs: { endsAt: true; isLifetime: true; paymentStatus: true; isOnFreeTrial: true; }; compute({ endsAt, isLifetime, paymentStatus, isOnFreeTrial }: { endsAt: Date | null; isLifetime: boolean; paymentStatus: StripePaymentStatu...' but required in type 'PrismaClientLike'.ts(2741)
When I comment out the $extends
in the custom prisma client, the error goes away. I followed the documentation and it was working at one point. I'm not sure if one of the latest updates broke it? Here are my versions:
@prisma/client: 4.16.1
prisma: 4.16.1
nestjs-prisma: 0.20.1
Dear Marc,
Could you update peer dependencies for the package with the release of nestjs 8.0.0 please ?
Regards,
Maxerbox
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.