Skip to content

generate:types hangs after completing (regression in 3.73.0, was fixed in 3.56.0) #15553

@bobbyo

Description

@bobbyo

Description

payload generate:types completes successfully (writes the output file) but the Node.js process never exits. It continues running at ~88% CPU indefinitely until manually killed.

This appears to be a regression of #13744, which was fixed in PR #13564 and released in v3.56.0.

Reproduction

  1. Have a Payload 3.73.0 project with @payloadcms/db-postgres and a non-trivial schema (~19 plugins, ~20+ collections)
  2. Run payload generate:types
  3. The types file is written correctly and completely
  4. The process never exits — it stays alive at ~88% CPU

In our case, we observed 4 concurrent generate:types processes (spawned by different build pipelines) all stuck for 40-60+ minutes each, consuming 4 CPU cores on an 8-core server until manually killed.

Evidence it completes successfully

  • The output file payload-types.ts (2,984 lines / 70KB) is written correctly
  • All types including self-referential relationships (e.g., grantedVia?: (string | null) | Share) are generated properly
  • The process just never calls process.exit() afterward

Environment

  • Payload: 3.73.0
  • DB Adapter: @payloadcms/db-postgres@3.73.0
  • Node.js: v20.19.6
  • OS: Ubuntu 24.04 (Linux 6.14.0-1017-azure)
  • Package manager: pnpm 10.x (monorepo with workspaces)

Expected behavior

payload generate:types should exit with code 0 after writing the types file, as was fixed in #13564.

Related issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions