trpc-openapi icon indicating copy to clipboard operation
trpc-openapi copied to clipboard

fix: update @trpc/server imports to use dist

Open mckelveygreg opened this issue 1 year ago • 3 comments

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

mckelveygreg avatar Oct 16 '23 21:10 mckelveygreg

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

tonyxiao avatar Oct 22 '23 03:10 tonyxiao

This also fixes problems encountered in https://github.com/jlalmes/trpc-openapi/issues/335

Cheunn-Panaa avatar Dec 11 '23 09:12 Cheunn-Panaa

Thank you for this!

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

kasparkallas avatar May 23 '24 19:05 kasparkallas