DT
Join ServerDrizzle Team
help
Drizzle kit generate gives error after upgrade
I have updated drizzle-orm to 0.26.0 and drizzle-kit to 018.0. I have defined relations according to the docs, to use the relational queries. When I run
drizzle-kit generate:sqlite
, I am getting this error
I guess some exports related to drizzle-zod and drizzle-orm/errors have changed.
And these are related
I am getting build errors after updating to 0.26.0
I am getting build errors after updating to 0.26.0
X [ERROR] Could not resolve "drizzle-orm/errors"
src/helpers/exceptions.ts:1:29:
1 │ import { DrizzleError } from "drizzle-orm/errors";
╵ ~~~~~~~~~~~~~~~~~~~~
The path "./errors" is not exported by package "drizzle-orm":
node_modules/drizzle-orm/package.json:153:13:
153 │ "exports": {
╵ ^
You can mark the path "drizzle-orm/errors" as external to exclude it from the bundle, which will remove this error.
Could not resolve "drizzle-orm/utils"
node_modules/.pnpm/drizzle-zod@0.2.1_drizzle-orm@0.26.0_zod@3.21.4/node_modules/drizzle-zod/index.js:6:24:
6 │ const utils_1 = require("drizzle-orm/utils");
╵ ~~~~~~~~~~~~~~~~~~~
Looking into it
Hi @Andrew Sherman Is this a bug in the new release or am I doing something wrong? Were you able to check this?
I guess it’s zod release bug
I will have a chance to check a bit later today and get back to you
I will have a chance to check a bit later today and get back to you
Oh alright, sure
import { DrizzleError } from "drizzle-orm/errors";
This import here also seems to be absent in the new release
has this been removed in favor of something else?
Hey @Andrew Sherman is this fixed?
Try to upgrade Zod to latest and check
drizzle-zod I mean
Sure will try that.
However, this import is from drizzle-orm
import { DrizzleError } from "drizzle-orm/errors";
Any suggestions on what to change this to fix this?
just import it from
"drizzle-orm"
Working fine now, 🙏