Drizzle kit generate gives error after upgrade

Ssubhendupsingh5/21/2023
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

Ssubhendupsingh5/21/2023
I guess some exports related to drizzle-zod and drizzle-orm/errors have changed.
Ssubhendupsingh5/21/2023
And these are related

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.
Ssubhendupsingh5/21/2023
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");
        ╵                         ~~~~~~~~~~~~~~~~~~~
ASAndrii Sherman5/21/2023
Looking into it
Ssubhendupsingh5/22/2023
Hi @Andrew Sherman Is this a bug in the new release or am I doing something wrong? Were you able to check this?
ASAndrii Sherman5/22/2023
I guess it’s zod release bug
I will have a chance to check a bit later today and get back to you
Ssubhendupsingh5/22/2023
Oh alright, sure
Ssubhendupsingh5/22/2023
import { DrizzleError } from "drizzle-orm/errors";
Ssubhendupsingh5/22/2023
This import here also seems to be absent in the new release
Ssubhendupsingh5/22/2023
has this been removed in favor of something else?
Ssubhendupsingh5/24/2023
Hey @Andrew Sherman is this fixed?
ASAndrii Sherman5/24/2023
Try to upgrade Zod to latest and check
ASAndrii Sherman5/24/2023
drizzle-zod I mean
Ssubhendupsingh5/24/2023
Sure will try that.
Ssubhendupsingh5/24/2023
However, this import is from drizzle-orm
import { DrizzleError } from "drizzle-orm/errors";
Ssubhendupsingh5/24/2023
Any suggestions on what to change this to fix this?
ASAndrii Sherman5/24/2023
just import it from "drizzle-orm"
Ssubhendupsingh5/24/2023
Working fine now, 🙏