Skip to content

generated drizzle schema does not compile #12126

Closed
@kenneth-devedis

Description

@kenneth-devedis

Describe the Bug

It generates the following code:

declare module '@payloadcms/db-postgres/types' {
  export interface GeneratedDatabaseSchema {
    schema: DatabaseSchema
  }
}

Typescript will complain: TS2664: Invalid module name in augmentation, module @payloadcms/db-postgres/types cannot be found.

The module seems to be deprecated.

I have to manually change @payloadcms/db-postgres/types to @payloadcms/db-postgres.

Link to the code that reproduces this issue

https://github.com/kenneth-devedis/payload-schema-does-not-compile

Reproduction Steps

  • docker compose up
  • pnpm install
  • pnpm generate:schema
  • pnpm build

Which area(s) are affected? (Select all that apply)

db-postgres

Environment Info

Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 10.8.0
Relevant Packages:
  payload: 3.33.0
  next: 15.3.0
  @payloadcms/db-postgres: 3.33.0
  @payloadcms/email-nodemailer: 3.33.0
  @payloadcms/graphql: 3.33.0
  @payloadcms/next/utilities: 3.33.0
  @payloadcms/payload-cloud: 3.33.0
  @payloadcms/richtext-lexical: 3.33.0
  @payloadcms/translations: 3.33.0
  @payloadcms/ui/shared: 3.33.0
  react: 19.1.0
  react-dom: 19.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions