Skip to content

bug: Cannot compile trpc-server without having skipLibCheck enabled #6136

Closed

Description

@SimonSimCity

Provide environment information

  System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 59.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 9.12.2 - ~/.nvm/versions/node/v20.10.0/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.101
    Safari: 17.4.1
  npmPackages:
    @trpc/server: 11.0.0-rc.580 => 11.0.0-rc.580+26ac97c0e 
    typescript: ^5.6.3 => 5.6.3 

Describe the bug

When trying to compile my project with tsc, I get the following error message:

node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:66:30 - error TS2552: Cannot find name 'EventSourceInit'. Did you mean 'EventSource'?

66     init: () => MaybePromise<EventSourceInit> | undefined;
                                ~~~~~~~~~~~~~~~

  node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:564:9
    564     var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T
                ~~~~~~~~~~~
    'EventSource' is declared here.


Found 1 error in node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:66

It compiles after setting skipLibCheck to true.

Link to reproduction

https://stackblitz.com/edit/github-efvgvu?file=tsconfig.json

To reproduce

Run tsc in the console.

Additional information

No response

👨‍👧‍👦 Contributing

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

Activity

  1. KATT commented on Oct 19, 2024

    @KATT
    Member

    skipLibCheck: true is kinda reocmmended for making apps - however, I'm fixing this in #6084

    Thanks for reporting though, we do want trpc to work without any specific type deps

  2. github-actions commented on Oct 22, 2024

    @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.

  3. locked as resolved and limited conversation to collaborators on Oct 22, 2024
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