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
- Have a Payload 3.73.0 project with
@payloadcms/db-postgres and a non-trivial schema (~19 plugins, ~20+ collections)
- Run
payload generate:types
- The types file is written correctly and completely
- 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
Description
payload generate:typescompletes 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
@payloadcms/db-postgresand a non-trivial schema (~19 plugins, ~20+ collections)payload generate:typesIn our case, we observed 4 concurrent
generate:typesprocesses (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
payload-types.ts(2,984 lines / 70KB) is written correctlygrantedVia?: (string | null) | Share) are generated properlyprocess.exit()afterwardEnvironment
@payloadcms/db-postgres@3.73.0Expected behavior
payload generate:typesshould exit with code 0 after writing the types file, as was fixed in #13564.Related issues
process.exit()in generate:types/generate:importmap