T3 Stack Prisma, tRPC error - data.id is missing

So I am trying to learn the techs in the T3 stack, and I encountered a weird problem. Error: Invalid prisma.dailyActivity.create() invocation: { data: { name: 'asd', timeSpent: 'asd', + id: String } } Argument id for data.id is missing. Note: Lines with + are required
7 Replies
.andreul
.andreulOP3y ago
So I am copying/learning the logic from https://github.com/trpc/examples-next-prisma-starter. In this code, there is no ID provided in the query, yet in my code, I get the error that I need to provide an ID
rocawear
rocawear3y ago
Remove it from your input on line #11
nexxel
nexxel3y ago
id is generated by prisma, you don't need to pass it in you're already doing @default(cuid())
.andreul
.andreulOP3y ago
removed it at line 11. same error
.andreul
.andreulOP3y ago
rocawear
rocawear3y ago
And error is?
.andreul
.andreulOP3y ago
It's mentioned above but now it's gone. I had another EPERM Error when trying to run "yarn install" and I literally deleted that file and now it works the file was in node_modules/.prisma/client file name: query_engine-windows.dll.node P.S it recreated that file, no errors
Want results from more Discord servers?
Add your server