Lionbyte
Explore posts from serversDTDrizzle Team
•Created by Lionbyte on 7/26/2023 in #help
Build fails because of drizzle typescript files
Created a node drizzle backend with typescript. When i run TSC for my build to compile
Any idea whats up? Im on the latest versions
i get these errors
Errors Files
2 node_modules/drizzle-orm/db.d-b9835153.d.ts:593
1 node_modules/drizzle-orm/node-postgres/index.d.ts:4
2 node_modules/drizzle-orm/pg-core/index.d.ts:336
Errors Files
2 node_modules/drizzle-orm/db.d-b9835153.d.ts:593
1 node_modules/drizzle-orm/node-postgres/index.d.ts:4
2 node_modules/drizzle-orm/pg-core/index.d.ts:336
node_modules/drizzle-orm/db.d-b9835153.d.ts:593:15 - error TS2515: Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.
593 declare class PgSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~
node_modules/drizzle-orm/db.d-b9835153.d.ts:733:15 - error TS2420: Class 'PgDelete<TTable, TQueryResult, TReturning>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgDelete<TTable, TQueryResult, TReturning>' but required in type 'SQLWrapper'.
733 declare class PgDelete<TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> implements SQLWrapper {
~~~~~~~~
node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
node_modules/drizzle-orm/node-postgres/index.d.ts:4:8 - error TS1192: Module '"/Users/artemaleksandruk/Development/ess/xavier-institute/enstigate-forge/node_modules/@types/pg/index"' has no default export.
4 import pg, { PoolClient, Client, QueryResult, QueryResultRow } from 'pg';
~~
node_modules/drizzle-orm/pg-core/index.d.ts:336:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault
336 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
337 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
339 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
340 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/drizzle-orm/pg-core/index.d.ts:338:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.
338 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
339 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
340 })[K]; } : never>;
node_modules/drizzle-orm/db.d-b9835153.d.ts:593:15 - error TS2515: Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.
593 declare class PgSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends PgSelectQueryBuilder<PgSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~
node_modules/drizzle-orm/db.d-b9835153.d.ts:733:15 - error TS2420: Class 'PgDelete<TTable, TQueryResult, TReturning>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'PgDelete<TTable, TQueryResult, TReturning>' but required in type 'SQLWrapper'.
733 declare class PgDelete<TTable extends AnyPgTable, TQueryResult extends QueryResultHKT, TReturning extends Record<string, unknown> | undefined = undefined> extends QueryPromise<TReturning extends undefined ? QueryResultKind<TQueryResult, never> : TReturning[]> implements SQLWrapper {
~~~~~~~~
node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
node_modules/drizzle-orm/node-postgres/index.d.ts:4:8 - error TS1192: Module '"/Users/artemaleksandruk/Development/ess/xavier-institute/enstigate-forge/node_modules/@types/pg/index"' has no default export.
4 import pg, { PoolClient, Client, QueryResult, QueryResultRow } from 'pg';
~~
node_modules/drizzle-orm/pg-core/index.d.ts:336:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault
336 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
337 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
339 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
340 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/drizzle-orm/pg-core/index.d.ts:338:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.
338 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
339 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
340 })[K]; } : never>;
7 replies
DTDrizzle Team
•Created by Lionbyte on 7/7/2023 in #help
Cosmos DB PostgresSQL Support?
I am wondering if anyone has got Drizzle to work with Cosmos DB postgres? if so, any big issues? Do you recommend it if you prefer cosmos db vs planetscale and other services?
1 replies
DTDrizzle Team
•Created by Lionbyte on 6/24/2023 in #help
@vercel/postgres & drizzle update?
Looks like
const db = drizzle(sql)
does not work anymore with the latest version of drizzle & @vercel/postgres. Anyone else seeing this and have a solution?
drizzle is looking for VercelPgClient but sql is now typed to Vercel pool3 replies