[email protected] with [email protected]

added drizzle-zod to my project and I am getting this error when starting the dev server - error ./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/drizzle-zod/index.mjs Attempted import error: 'is' is not exported from 'drizzle-orm' (imported as 'n'). Import trace for requested module: ./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/drizzle-zod/index.mjs ./drizzle/schema.ts ./app/page.tsx am i doing something wrong?
3 Replies
msh
mshOP2y ago
upgrading drizzle-orm to 0.27.0 and adding dbCredentials instead of flat connectionString and ts-ignoring the type error somehow worked? push/pull/generate/insert/select all work now
import * as dotenv from "dotenv"
import type { Config } from "drizzle-kit"

dotenv.config()

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
dbCredentials: {
// @ts-ignore
connectionString: process.env.DATABASE_URL, // typescript: Type 'string | undefined' is not assignable to type 'string'.
// Type 'undefined' is not assignable to type 'string'. [2322]
// ^ this error occurs both on typescript version 4.9.5 and 5.1.6
},
breakpoints: true,
tablesFilter: ["playground_*"],
} satisfies Config
import * as dotenv from "dotenv"
import type { Config } from "drizzle-kit"

dotenv.config()

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
dbCredentials: {
// @ts-ignore
connectionString: process.env.DATABASE_URL, // typescript: Type 'string | undefined' is not assignable to type 'string'.
// Type 'undefined' is not assignable to type 'string'. [2322]
// ^ this error occurs both on typescript version 4.9.5 and 5.1.6
},
breakpoints: true,
tablesFilter: ["playground_*"],
} satisfies Config
Andrii Sherman
so no issues now?
msh
mshOP2y ago
no issues anymore
Want results from more Discord servers?
Add your server