drizzle-orm doesn't compile

I've just created a blank typescript project for nodeJs and installed the library as specified in Drizzle doc. In the index.ts file of the project, I have the following code:
import { integer, pgTable, text } from 'drizzle-orm/pg-core';
export const pathList = pgTable('pathList', {
id: integer('id').primaryKey(),
path: text('path',).notNull(),
type: text('type').default('FILE').notNull(),

});
import { integer, pgTable, text } from 'drizzle-orm/pg-core';
export const pathList = pgTable('pathList', {
id: integer('id').primaryKey(),
path: text('path',).notNull(),
type: text('type').default('FILE').notNull(),

});
When I run "tsc", I got a ton of errors from "node_modules/drizzle-orm/query-promise.d-2e42fbc9.d.ts" For example:
node_modules/drizzle-orm/query-promise.d-2e42fbc9.d.ts:547:96 - error TS1005: '?' expected.

547 [K in NonUndefinedKeysOnly<TInclude> & keyof TRelations]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<TSchema, FindTableByDBName<TSchema, TRel['referencedTableName']>, Assume<TInclude[K], true | Record<string, unknown>>> extends infer TResult ? TRel extends One ? (TResult | (Equal<TRel['isNullable'], false> extends true ? null : never)) : TResult[] : never : never;
~~~~~~~

node_modules/drizzle-orm/query-promise.d-2e42fbc9.d.ts:547:104 - error TS1005: ':' expected.
node_modules/drizzle-orm/query-promise.d-2e42fbc9.d.ts:547:96 - error TS1005: '?' expected.

547 [K in NonUndefinedKeysOnly<TInclude> & keyof TRelations]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<TSchema, FindTableByDBName<TSchema, TRel['referencedTableName']>, Assume<TInclude[K], true | Record<string, unknown>>> extends infer TResult ? TRel extends One ? (TResult | (Equal<TRel['isNullable'], false> extends true ? null : never)) : TResult[] : never : never;
~~~~~~~

node_modules/drizzle-orm/query-promise.d-2e42fbc9.d.ts:547:104 - error TS1005: ':' expected.
My dependencies on the snapshot How can I solve this?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server