-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Consider fixing types to prevent erros when installing the package in an ESM project #1769
Comments
Could you submit a PR to fix this issue? |
Our code base broke with similar errors when upgrading from 5.1.3 to 5.3.4 This might be related to |
@robertsLando As far as whether I can fix this, I don't know how to. I am not able to parse the information on the site I linked well enough to be able to figure out what the supposed fix is and the thread linked by Markus goes way over my head. I've personally been in the ESM-only land for several years now so my experience with dealing with CJS has (for the most part, thankfully, but in this specific instance, unfortunately) all but vanished. |
@mschuettlerTNG I will give a look at this when I have some time in the meanwhile if you find a fix feel free to submit a PR |
BTW this happens to me when using MQTT with Vite and I was able to make the error go away with this Vite config but then ran into a runtime error instead:
|
Hi @TomasHubelbauer , did you checked the vite example in this repo? I made it work without any additional configuration, see https://github.com/mqttjs/MQTT.js/tree/main/examples/vite-example |
Hi, I am trying to use your project through https://www.npmjs.com/package/eufy-security-client which relies on it. I set up a new Vite project using
npm create vite@latest my-react-app -- --template react
and installed the package but when I runnpm run build
, I run into an error which says:I believe this might be caused by incorrectly configured types. I checked your package using https://arethetypeswrong.github.io/?p=mqtt%405.3.4 and this is the result:
I am not a 100 % certain, but I believe the errors reported there might be what's causing the above issue.
I wonder if these could be fixed to make the package compatible with both CJS and ESM.
The text was updated successfully, but these errors were encountered: