PrismaClientValidationError: Invalid ` .create()` invocation in
Hi There i'm new in this discord server,
I wanna to ask about my project error, here's the details:
schema.prisma
event.service.ts
event.controller.ts
5 Replies
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into
#ask-ai
if you get antsy for a second opinion!event.dto.ts
I have done running
prisma generate
and still got an error, what should i do now? thanks
and yeah when i print an input from event.service.ts
it says like this:
Hey!
Can you share the error message that you are getting? Which parameters are missing?
Can you share what you are passing as
data
in prisma.event.create call?sure i'll provide you wait there
Error:
Invalid value for argument
data: We could not serialize [object Function] value. Serialize the object to JSON or implement a ".toJSON()" method on it.
data:
oh when i was using a prisma generated type (EventCreateInput
in controller and service) it work but what when wrong with my dto?
here's my main.ts
oh lol it because i just using import type at dto sorry, and thanks for the responseAh. no worries!
Glad to hear that you were able to resolve it