wael
wael
WWasp-lang
Created by wael on 11/4/2023 in #🙋questions
Can anybody help with this problem
[Server!] 19 | following User[] @relation("UserFollows", fields: [followingId], references: [id]) [Server!] 20 | followers User[] @relation("UserFollowed", fields: [followerId], references: [id]) [Server!] 21 | followingId Int [Server!] | [Server!] [Server!] Validation Error Count: 2 [Server!] [Context: getDmmf] [Server!] [Server!] Prisma CLI Version : 4.16.2 [Client] Environment variables loaded from .env [Client] Prisma schema loaded from ../db/schema.prisma [Client!] Error: Prisma schema validation - (get-dmmf wasm) [Client!] Error code: P1012 [Client!] error: Error validating field following in model User: The relation field following on model User is missing an opposite relation field on the model User. Either run prisma format or add it manually. [Client!] --> schema.prisma:19 [Client!] | [Client!] 18 | posts Post[] [Client!] 19 | following User[] @relation("UserFollows", fields: [followingId], references: [id]) [Client!] 20 | followers User[] @relation("UserFollowed", fields: [followerId], references: [id]) [Client!] | [Client!] error: Error validating field followers in model User: The relation field followers on model User is missing an opposite relation field on the model User. Either run prisma format or add it manually. [Client!] --> schema.prisma:20 [Client!] | [Client!] 19 | following User[] @relation("UserFollows", fields: [followingId], references: [id]) [Client!] 20 | followers User[] @relation("UserFollowed", fields: [followerId], references: [id]) [Client!] 21 | followingId Int [Client!] | [Client!] [Client!] Validation Error Count: 2 [Client!] [Context: getDmmf] [Client!] [Client!] Prisma CLI Version : 4.16.2 ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - Prisma client generation failed with exit code: 1 ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found
2 replies