maloguertin / msw-trpc

tPRC support for MSW
208 stars 21 forks source link

Cannot run msw-trpc with vitest #15

Closed Q16solver closed 1 year ago

Q16solver commented 1 year ago

Describe the bug After upgrading msw-trpc from v1.2.1 -> v1.3.1, running vitest with my current setup is giving an ES module reference error, not quite sure what the issue could be.

image

Expected behavior Vitest should run as normal before the upgrade.

Versions typescript: v5.0.4 tRPC: v10.20.0 msw: v1.3.1

Q16solver commented 1 year ago

Update: I think it might just be a small issue with the package.json type with a recent commit to revert back to commonjs, "type": "module" means that you declare it as ESM, please correct me if I'm wrong, so I believe we need to remove that

https://github.com/maloguertin/msw-trpc/commit/3293513c0a52abf416912a4e9e4a70c086eec45c

maloguertin commented 1 year ago

@Q16solver you're right, sorry about that I'll push a fix!

maloguertin commented 1 year ago

I'll close this as it should be solved by: https://github.com/maloguertin/msw-trpc/releases/tag/v1.3.2

Q16solver commented 1 year ago

@maloguertin Tested that it works now! closing this issue, thanks c: