Joonatan
11/16/2021, 6:03 PMcustom:
webpack:
includeModules: true
packagerOptions:
scripts:
- prisma generate
- rm -R node_modules/@prisma/engines
- rm -R node_modules/@prisma/engines-version
- rm node_modules/prisma/libquery_engine-darwin.dylib.node
- rm -R node_modules/prisma/engines
Peter Kellner
11/16/2021, 6:22 PMfebreeze
11/16/2021, 9:48 PMMykyta Machekhin
11/16/2021, 10:17 PMMo El
11/17/2021, 12:05 AMPeter Takacs
11/17/2021, 10:38 AMDaniel
11/17/2021, 11:17 AMnpm build
with an existing very simple database with two tables:
node_modules/.prisma/client/index.d.ts144998 - error TS2314: Generic type ‘Keys’ requires 1 type argument(s). I have two tables, Keys
and KeyRatios
mapped like this (omitted trivial attributes):
model KeyRatios {
Id Int @id(map: “PK_KeyRatios”) @default(autoincrement())
KeyId Int
Keys Keys @relation(fields: [KeyId], references: [Id], onDelete: Cascade, onUpdate: NoAction, map: “FK_KeyRatios_Keys_KeyId”)
@@index([KeyId], map: “IX_KeyRatios_KeyId”)
}
model Keys {
Id Int @id(map: “PK_Keys”) @default(autoincrement())
KeyRatios KeyRatios[]
}
1449 Keys<T extends KeysArgs = {}>(args?: Subset<T, KeysArgs>): CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>;
~~~~
node_modules/.prisma/client/index.d.ts:2049:11 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2049 ? Keys
~~~~
node_modules/.prisma/client/index.d.ts:2054:7 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2054 ? Keys & {
~~~~
node_modules/.prisma/client/index.d.ts:2063:51 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2063 [P in TrueKeys<S['select']>]: P extends keyof Keys ?Keys [P]
~~~~
node_modules/.prisma/client/index.d.ts:2063:57 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2063 [P in TrueKeys<S['select']>]: P extends keyof Keys ?Keys [P]
~~~~
node_modules/.prisma/client/index.d.ts:2070:7 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2070 : Keys
~~~~
node_modules/.prisma/client/index.d.ts:2071:5 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2071 : Keys
~~~~
node_modules/.prisma/client/index.d.ts:2094:132 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2094 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2094:214 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2094 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2111:131 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2111 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2111:213 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2111 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2131:43 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2131 ): CheckSelect<T, PrismaPromise<Array<Keys>>, PrismaPromise<Array<KeysGetPayload<T>>>>
~~~~
node_modules/.prisma/client/index.d.ts:2147:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2147 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2179:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2179 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2198:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2198 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2256:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2256 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
KJReactor
11/17/2021, 11:50 AMSCRAM AuthenticationFiled
issues when trying to connect to a local MongoDB replicaSet?Merlin G
11/17/2021, 11:54 AMtarget: serverless
issue that has me baffled. I have a branch which throws this error when I run `next build`:
Error: ENOENT: no such file or directory, open '/Users/<my path>/.next/serverless/chunks/schema.prisma'
Which seems like a change to prisma, or to next which has caused the schema.prisma
to go missing, except we pin our dependencies and the versions haven't changed. So what could cause this?
The schema.prisma
file in our repo hasn't moved, and our build scripts haven't changed either. The only changes are to some of our API and the addition of a tsx
page.
Happens with Prisma & client 3.2.1 and 3.5.0user
11/17/2021, 11:59 AMDan
11/17/2021, 4:53 PMtarget_session_attrs
Dan
11/17/2021, 4:53 PM<postgresql://host1:123>,host2:456/somedb?target_session_attrs=any
KJReactor
11/17/2021, 5:51 PMMalformed ObjectID: provided hex string representation
error. I'm using Mongo provider and prisma 3.5.0Yaakov
11/17/2021, 7:01 PMREADME
states that it is for Prisma 2?Kent C. Dodds
11/17/2021, 7:20 PMDan
11/17/2021, 8:26 PMdataProxy
service be used over pg bouncer
Dan
11/17/2021, 8:27 PMDan
11/17/2021, 8:28 PMDan
11/17/2021, 8:28 PMfebreeze
11/17/2021, 8:56 PMMichael Auderer
11/18/2021, 1:37 AMprisma migrate dev
I see this:
`The trust
column on the Lead
table would be dropped and recreated. This will lead to data loss.`
Is it possible to convert this column without data loss? If I just do it in a plain SQL migration, will that mess anything up with Prisma?alechko
11/18/2021, 6:33 AMawait prisma.user.create({
data: {
email: faker.internet.email(),
posts: {
create: {
title: faker.lorem.sentence(10),
comments: {
create: [
{
body: faker.lorem.paragraph(10),
children: {
create: [ <--- THIS FAILS TO INHERIT THE POST
{
body: faker.lorem.paragraph(10),
}
]
},
},
],
},
},
},
},
});
So the children
section fails because the Comment entity has a postId
field, and it’s working (inheriting the post) for the parent comment but not for children comments.
my comment model looks like this:
model Comment {
id String @id() @default(uuid()) @db.Uuid
body String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deletedAt DateTime?
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
userId String? @db.Uuid
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
postId String @db.Uuid
parent Comment? @relation("CommentParent", fields: [parentId], references: [id])
parentId String? @db.Uuid
children Comment[] @relation("CommentParent")
}
Dan
11/18/2021, 8:18 AMNeo Lambada
11/18/2021, 11:44 AMNeo Lambada
11/18/2021, 11:44 AMNeo Lambada
11/18/2021, 11:45 AMNeo Lambada
11/18/2021, 11:45 AMNeo Lambada
11/18/2021, 11:50 AM