Hey. I'm following mongodb docs for prisma but I'...
# orm-help
l
Hey. I'm following mongodb docs for prisma but I'm getting this erorr:
Copy code
error: Error parsing attribute "@default": The function auto is not a known function.
  -->  schema.prisma:11
   | 
10 | model Session {
11 |   id           Bytes    @id @default(auto()) @map("_id") @db.ObjectId
If I use
dbgenerated
instead, i get told to use
auto()
... I am on version
"@prisma/client": "^4.1.1",
โœ… 1
n
Hey Logan ๐Ÿ‘‹ I just tried replicating the model that you have shared and it worked as expected for me. Just for confirmation, could you check if version of
prisma
in
devDependencies
is also
4.1.1
?
l
Hey @Nurul I assume by
devDependencies
you mean my
package.json
? If so, yes. My Prisma is
4.1.1
Copy code
"@prisma/client": "^4.1.1",
    "prisma": "^4.1.1",
Hey! I've managed to find the problem. I saw by
devDependancies
its a separate object in the
package.json
, so then i realized I need to run yarn
prisma generate
instead. Thanks ๐Ÿ™‚
n
Thatโ€™s great to hear! ๐Ÿ™Œ