Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Run generate:types When Using a Different Language #10145

Closed
tobiasiv opened this issue Dec 23, 2024 · 3 comments · Fixed by #10181
Closed

Cannot Run generate:types When Using a Different Language #10145

tobiasiv opened this issue Dec 23, 2024 · 3 comments · Fixed by #10181

Comments

@tobiasiv
Copy link

Describe the Bug

When setting a different language in the Payload config for i18n, the pnpm generate:types command fails.

Link to the code that reproduces this issue

https://github.com/tobiasiv/payload-reproduction/tree/translations

Reproduction Steps

  1. Clone the reproduction repo (branch: translations)
  2. Set the env variables
  3. Run pnpm generate:types
  4. A TypeError appears: Cannot read properties of undefined (reading 'translations')

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

area: core

Environment Info

Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 9.7.0
Relevant Packages:
  payload: 3.11.0
  next: 15.1.0
  @payloadcms/db-mongodb: 3.11.0
  @payloadcms/db-postgres: 3.11.0
  @payloadcms/email-nodemailer: 3.11.0
  @payloadcms/graphql: 3.11.0
  @payloadcms/next/utilities: 3.11.0
  @payloadcms/payload-cloud: 3.11.0
  @payloadcms/richtext-lexical: 3.11.0
  @payloadcms/translations: 3.11.0
  @payloadcms/ui/shared: 3.11.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 19.6.0: Tue Feb 15 21:39:11 PST 2022; root:xnu-6153.141.59~1/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 4
@tobiasiv tobiasiv added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Dec 23, 2024
r1tsuu added a commit that referenced this issue Dec 26, 2024
Previously, if you had for example only `de` in `i18n` -
`generate:types` would fail
Fixes #10145
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Dec 26, 2024
@tobiasiv
Copy link
Author

Hey @r1tsuu - Thanks for the fix!

Copy link
Contributor

🚀 This is included in version v3.12.0

Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant