Skip to content

bug: trpc-openapi doesn't support TypeScript 7 #8044

Closed

Description

@ahmafi

Provide environment information

    Node: 26.13.1 - /run/user/1000/fnm_multishells/184410_1794564537910/bin/node
    npm: 11.20.0 - /run/user/1000/fnm_multishells/184410_1794564537910/bin/npm
    pnpm: 12.5.1 - /home/amir/.local/share/pnpm/bin/pnpm
    typescript: catalog: => 7.0.2

Describe the bug

I'm currently using TypeScript 7 and everything works except @trpc/openapi. Is TypeScript 7 still not providing the API for this?

✕ unmet peer typescript
  Installed: 7.0.2
  Wanted:
    "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x":
      [email protected]
    ">=5.8.2 <7":
      @trpc/[email protected]
pnpm exec trpc-openapi --version
file:///.../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@types+ws@8_689cd0120e80d0650bd80081ceb9fe0b/node_modules/@trpc/openapi/dist/cli.mjs:262
const PRIMITIVE_FLAGS = ts.TypeFlags.String | ts.TypeFlags.Number | ts.TypeFlags.Boolean | ts.TypeFlags.StringLiteral | ts.TypeFlags.NumberLiteral | ts.TypeFlags.BooleanLiteral;
                                     ^

TypeError: Cannot read properties of undefined (reading 'String')
    at file:///.../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@types+ws@8_689cd0120e80d0650bd80081ceb9fe0b/node_modules/@trpc/openapi/dist/cli.mjs:262:38
    at ModuleJob.run (node:internal/modules/esm/module_job:569:25)
    at async node:internal/modules/esm/loader:650:26
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Link to reproduction

https://stackblitz.com/github/trpc/examples-next-minimal-starter

To reproduce

Just a basic example with TypeScript 7 and @trpc/openapi

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Activity

  1. added a commit that references this issue on Nov 14, 2026
    6e6fd19
  2. Nick-Lucas commented on Nov 14, 2026

    @Nick-Lucas
    Contributor

    Typescript 7.1 (currently in RC) will be adding the compiler APIs so we'll get the package updated to that soon.

    For now your package manager will have a way to define using TS6 just for our package, as a workaround

  3. added a commit that references this issue on Nov 14, 2026
    f03e555
  4. added a commit that references this issue on Nov 15, 2026
    2fdd987
  5. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions