No such argument error in relations with prisma2 beta1
See original GitHub issueHello to all.
I am using “@prisma/cli”: “^2.0.0-beta.1”,
I have schema definition like:
someFieldX TypeX @relation(fields: [someFieldXId], references: [id])
someFieldXId String
When trying to run prisma2 generate I am getting the following error:
Error: Schema parsing error: No such argument.
And the issue seems to be fields: [someFieldXId] as this is highlighted in red
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Error message reference - Prisma
Prisma Client throws a PrismaClientUnknownRequestError exception if the query engine returns an error related to a request that does not have an error...
Read more >M-N relationships are not working with migrations
bin/prisma2 migrate save --experimental error: No such argument. We successfully received the error report To help us even more, please create ...
Read more >Unknown argument error when creating record - Stack Overflow
Prisma essentially generates two type definitions for a create query. This is implemented with a XOR type, which ensures that only one ...
Read more >typegraphql-prisma: Versions - Openbase
Supported Prisma version has been bumped to v4.8.0 No changes in DMMF ... It allows using conditions while getting relations count. ... 0.21.6-beta.1....
Read more >Working With Prisma 2: Many-to-Many Relations - YouTube
In this video we deal with many-to-many relations using Prisma 2. Prerequisites: Familiarity with Node.js, TypeScript, and using an ORM such ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@JCLMAQ I think this error is being thrown because you are using an old version of prisma (the generate command that you are using is
npx prisma2 generateinstead of the one from 2.0.0-beta.1 which isnpx prisma generate). Please update prisma tov2.0.0-beta.1and that should resolve the issue.@akoufa are you too using the old version?
@ranjan-purbey
Yes I already had deleted node_modules and lock file.
npx prisma -voutput:But I used
npm cache clean --forceAnd now it get’s the correct version. So I will close the issue. Thank you.