mmurto
mmurto
Explore posts from servers
DTDrizzle Team
Created by sevenwestonroads on 4/22/2023 in #help
Using Drizzle as a package in Turborepo doesn't work ?
Then just don't install drizzle-orm anywhere else, but import what is needed from @mono/database.
13 replies
DTDrizzle Team
Created by sevenwestonroads on 4/22/2023 in #help
Using Drizzle as a package in Turborepo doesn't work ?
I have the same setup - I have this in my @mono/database/index.ts and everything works flawlessly:
export * from "./schema";
export * from "drizzle-orm";
export { type PostgresJsDatabase } from "drizzle-orm/postgres-js";
export * from "./schema";
export * from "drizzle-orm";
export { type PostgresJsDatabase } from "drizzle-orm/postgres-js";
13 replies
DTDrizzle Team
Created by mmurto on 4/9/2023 in #help
How to filter length in where for postgres?
Thanks a lot!
4 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Thanks! I'll try to fix that, thought of it as well but the versions in package.json's were the same, so thought they resolved to the same.
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Sorry bout the formatting 🙂
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Here's the tsc log:
@dcmnt/api:type-check: > @dcmnt/[email protected] type-check /Users/nn/Code/mm/dcmnt/packages/api
@dcmnt/api:type-check: > tsc --noEmit
@dcmnt/api:type-check:
@dcmnt/api:type-check: src/service/project.ts(27,12): error TS2345: Argument of type 'SQL<unknown>' is not assignable to parameter of type 'SQL<unknown> | ((aliases: { id: MySqlColumn<{ data: string; driverParam: string | number; notNull: true; hasDefault: true; tableName: "Project"; }>; name: MySqlColumn<{ data: string; driverParam: string | number; hasDefault: false; notNull: true; tableName: "Project"; }>; description: MySqlColumn<...>; createdAt: My...'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").SQL<unknown>' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").SQL<unknown>'.
@dcmnt/api:type-check: Types of property 'queryChunks' are incompatible.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk[]' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk[]'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk'.
@dcmnt/api:type-check: Type 'Name' is not assignable to type 'Chunk'.
@dcmnt/api:type-check: Property 'encoder' is missing in type 'Name' but required in type 'Param<unknown, unknown>'.
@dcmnt/api:type-check:  ELIFECYCLE  Command failed with exit code 2.
@dcmnt/api:type-check: ERROR: command finished with error: command (/Users/nn/Code/mm/dcmnt/packages/api) pnpm run type-check exited (1)
@dcmnt/api:type-check: > @dcmnt/[email protected] type-check /Users/nn/Code/mm/dcmnt/packages/api
@dcmnt/api:type-check: > tsc --noEmit
@dcmnt/api:type-check:
@dcmnt/api:type-check: src/service/project.ts(27,12): error TS2345: Argument of type 'SQL<unknown>' is not assignable to parameter of type 'SQL<unknown> | ((aliases: { id: MySqlColumn<{ data: string; driverParam: string | number; notNull: true; hasDefault: true; tableName: "Project"; }>; name: MySqlColumn<{ data: string; driverParam: string | number; hasDefault: false; notNull: true; tableName: "Project"; }>; description: MySqlColumn<...>; createdAt: My...'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").SQL<unknown>' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").SQL<unknown>'.
@dcmnt/api:type-check: Types of property 'queryChunks' are incompatible.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk[]' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk[]'.
@dcmnt/api:type-check: Type 'import("/Users/nn/Code/mm/dcmnt/node_modules/drizzle-orm/sql/index").Chunk' is not assignable to type 'import("/Users/nn/Code/mm/dcmnt/packages/db/node_modules/drizzle-orm/sql/index").Chunk'.
@dcmnt/api:type-check: Type 'Name' is not assignable to type 'Chunk'.
@dcmnt/api:type-check: Property 'encoder' is missing in type 'Name' but required in type 'Param<unknown, unknown>'.
@dcmnt/api:type-check:  ELIFECYCLE  Command failed with exit code 2.
@dcmnt/api:type-check: ERROR: command finished with error: command (/Users/nn/Code/mm/dcmnt/packages/api) pnpm run type-check exited (1)
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
The db package has:
{
"extends": "../../tsconfig.json",
"include": [
"./**/*.ts"
]
}
{
"extends": "../../tsconfig.json",
"include": [
"./**/*.ts"
]
}
and the server package:
{
"extends": "../../tsconfig.json",
"include": ["src", "index.ts", "transformer.ts"]
}
{
"extends": "../../tsconfig.json",
"include": ["src", "index.ts", "transformer.ts"]
}
10 replies
DTDrizzle Team
Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
Sure! The root one:
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [".eslintrc.cjs"]
}
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [".eslintrc.cjs"]
}
10 replies