Hi all, Today I was upgrading to prisma 4.2.1 and ...
# orm-help
m
Hi all, Today I was upgrading to prisma 4.2.1 and encountered and error with the "orderByNulls" being unavalible
Copy code
Running generate... (Use --skip-generate to skip the generators)
Error: Get DMMF: Schema parsing - Error while interacting with query-engine-node-api library
Error code: P1012
error: The preview feature "orderByNulls" is not known. Expected one of: filterJson, referentialIntegrity, mongoDb, interactiveTransactions, fullTextSearch, fullTextIndex,
My other prject uses 4.1.0 at the moment and it works as intended. I did not find (or didnt look deep enough) any info on github or the release note about the feature being GA so i was wondering if It might be unintended.
1
r
Hi @MeetSnowmaker 👋 The
orderByNulls
is available in preview. You would need to set the Preview feature flag in your Prisma schema. You can find more information on the docs
m
Thanks for the reply, this is my current setting
Copy code
generator rootUtilClient {
  provider        = "prisma-client-js"
  output          = "../generated/prisma2-client"
  previewFeatures = ["interactiveTransactions", "orderByNulls"]
  binaryTargets   = ["native"]
}
this threw an error after updateing the prisma to 4.2.1 in the project if this should work I am going to revisit the schema or the dependiencies versions.
Found the source of the problem, For some reason the `@prisma/client`was still 3.15.2 in my package.json. once I commented out the previewFeatures it managed to generate the clients and threw the warning
Copy code
warn Versions of prisma@4.2.1 and @prisma/client@3.15.2 don't match.
This might lead to unexpected behavior.
Please make sure they have the same version.
it is now working as intended. Apart from me being an idiot, I wonder if this warning could occour in the beginning of the generate script (both times). The primary error I received always printed out the prisma version as 4.2.1 so the root cause was hidden for a while