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

fix: update @trpc/server imports to use dist #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mckelveygreg
Copy link

@mckelveygreg mckelveygreg commented Oct 16, 2023

TRPC ships with its src .ts files. There are sneaky imports in this lib that were accidentally targeting TRPC ts, and not the dist files, making it so the whole @trpc/server lib was getting checked by the consumer's tsc build!

In particular, this surfaced for me because my project has verbatimModuleSyntax set to true, and trpc does not lean on that option.

Thanks for this nifty lib and let me know how else I can help

For anyone else coming across this, you can monkey patch with yarn until it gets shipped: https://yarnpkg.com/cli/patch

TRPC ships with its src ts files and these sneaky imports were accidentally targeting that ts, and not the dist files, making it so the whole trpc lib was getting checked by the consumers tsc build! In particular, this surfaced for me because my project has verbatimModuleSyntax set to true, and trpc does not lean on that option.
@tonyxiao
Copy link

Thanks for the fix @mckelveygreg ! I got a similar issue here https://github.com/useVenice/venice/actions/runs/6516455413 and confirm monkey patching fixes it too
image

@Cheunn-Panaa
Copy link

This also fixes problems encountered in #335

@kasparkallas
Copy link

kasparkallas commented May 23, 2024

Thank you for this!

@jlalmes come on, this is as an easy and essential one to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants