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

ES module support #78

Open
Gusb3ll opened this issue Sep 20, 2022 · 5 comments
Open

ES module support #78

Gusb3ll opened this issue Sep 20, 2022 · 5 comments

Comments

@Gusb3ll
Copy link

Gusb3ll commented Sep 20, 2022

I wanted to use mqemitter with my graphql mercurius here's my implementation

image

but after I use it in the mercurius config I got these errors

TypeError: (0 , mqemitter_redis_1.default) is not a function

so I can't import it as an ES module, I'm wondering is there any planned support for it. Tysm 🙏

@mcollina
Copy link
Owner

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.

@Gusb3ll
Copy link
Author

Gusb3ll commented Sep 20, 2022

Here's my reproduction https://github.com/Gusb3ll/mqemitter-issue

@mcollina
Copy link
Owner

Can you simplify this by removing Nest.js? I'm not familiar with it and it makes this significantly harder to fix. A PR would also be highly welcomed.

@tomi-bigpi
Copy link

I'm pretty sure the issue I'm running into is the same root cause wrt problems using this under ESM only. The check under https://arethetypeswrong.github.io/?p=mqemitter-redis%406.0.0 shows:

image

...with a suggested fix.

@mcollina
Copy link
Owner

mcollina commented Aug 2, 2024

A PR would be ok

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

No branches or pull requests

3 participants