Effect CommunityEC
Effect Community5mo ago
21 replies
danielo515

Type Compatibility Issues with Updated Packages in Effect Create App

I just started a new repository using the Effect Create app, and the packages were a bit outdated, so I just put 'latest' on all packages and ran 'pnpm install' .
I think I'm running into type compatibility issues because given this code :
      const db = yield* PgDrizzle

      const create = (data: NewTranscriptionEmbedding) =>
        Effect.gen(function*() {
          const result = yield* db.insert(transcriptionEmbeddings).values(data).returning()
          return result[0] as TranscriptionEmbedding
        }).pipe(
          Effect.catchTag("SqlError", (error) => Effect.fail(new DatabaseError({ cause: error, operation: "create" }))),
          Effect.annotateLogs("operation", "TranscriptionEmbeddingsRepository.create"),
          Effect.withSpan("TranscriptionEmbeddingsRepository.create")
        )

I'm having this error:
Argument of type 'PgTableWithColumns<{ name: "transcription_embeddings"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "transcription_embeddings"; dataType: "string"; columnType: "PgUUID"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, {}>; ... 4 more ...; updatedAt: PgColumn<......' is not assignable to parameter of type 'PgTable<TableConfig>' with 'exactOptionalPropertyTypes

I checked and my drizzle version seems to be in range:
dependencies:
@effect/sql-drizzle 0.43.0
└── drizzle-orm 0.44.4 peer
drizzle-orm 0.44.4

What can be causing this problem?
Was this page helpful?