Skip to content

generate:types works occasionally #9378

Closed

Description

@seccentral

Describe the Bug

As reported by multiple users on Discord (myself included) it seems to be a platform independent issue that whenever you attempt to generate:types manually, the command executes without error, without any sort of feedback, but does not generate the types.
This has been tested on user code migrated from beta to 3.0 stable but I also tested it on the official payload default website template that comes with create-payload-app for the current 3.0.1 version just to be sure.

Link to the code that reproduces this issue

official payload 3 stable website template

Reproduction Steps

run generate:types .
It - MAY - work from the 1st try, but usually it takes a random amount of tries.
Original User reporting success after spamming the command multiple times (frustration saved the day?) here https://discord.com/channels/967097582721572934/1308797740087775232

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

area: core

Environment Info

Binaries:
  Node: 20.18.1
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.14.2
Relevant Packages:
  payload: 3.0.1
  next: 15.0.3
  @payloadcms/db-postgres: 3.0.1
  @payloadcms/email-nodemailer: 3.0.1
  @payloadcms/graphql: 3.0.1
  @payloadcms/live-preview: 3.0.1
  @payloadcms/live-preview-react: 3.0.1
  @payloadcms/next/utilities: 3.0.1
  @payloadcms/payload-cloud: 3.0.1
  @payloadcms/plugin-form-builder: 3.0.1
  @payloadcms/plugin-nested-docs: 3.0.1
  @payloadcms/plugin-redirects: 3.0.1
  @payloadcms/plugin-search: 3.0.1
  @payloadcms/plugin-seo: 3.0.1
  @payloadcms/richtext-lexical: 3.0.1
  @payloadcms/translations: 3.0.1
  @payloadcms/ui/shared: 3.0.1
  react: 19.0.0-rc-65a56d0e-20241020
  react-dom: 19.0.0-rc-65a56d0e-20241020
Operating System:
  Platform: linux
  Arch: x64
  Version: #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov  4 02:06:24 UTC 2024
  Available memory (MB): 7895
  Available CPU cores: 8

PS: the payload command should have some output, feedback, or at least throw something. as it is it has no --help, no list of commands no explanatory output accesible right away from the cli

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Nov 20, 2024
  2. github-actions commented on Nov 20, 2024

    @github-actions
    Contributor

    Please add a reproduction in order for us to be able to investigate.

    Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.

    Why was this issue marked with the invalid-reproduction label?

    To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@beta -t blank or a forked/branched version of this repository with tests added (more info in the reproduction-guide).

    To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.

    Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.

    I added a link, why was it still marked?

    Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

    Useful Resources

  3. removed
    validate-reproduction
    on Nov 20, 2024
  4. yonnic commented on Nov 20, 2024

    @yonnic

    omg yes i had a fight with this bug the whole day when i was working with job tasks and all the TS types were missing.
    I can confirm that it randomly works

  5. self-assigned this
    on Nov 20, 2024
  6. added
    status: verified
    and removed
    status: needs-triage
    on Nov 20, 2024
  7. removed
    status: verified
    on Nov 20, 2024
  8. github-actions commented on Nov 20, 2024

    @github-actions
    Contributor

    🚀 This is included in version v3.0.2

  9. andershermansen commented on Nov 20, 2024

    @andershermansen
    Contributor

    generate:types 6 times with v3.0.1.
    Result: 3 times with no output. 3 times executed ok.

    generate:types 6 times with v3.0.2
    Result: 6 times executed ok 👍

  10. DanRibbens commented on Nov 20, 2024

    @DanRibbens
    Contributor

    Thanks for confirming @andershermansen!

  11. github-actions commented on Nov 22, 2024

    @github-actions
    Contributor

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

  12. locked as resolved and limited conversation to collaborators on Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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