We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I use Vite and MQTT.JS in my project and since I updated to v5.2.0, I got the following error in Firefox console:
v5.2.0
# Console Uncaught SyntaxError: ambiguous indirect export: default [App.vue:2:8](http://localhost:5173/src/App.vue) # App.vue import { createHotContext as __vite__createHotContext } from "/@vite/client";import.meta.hot = __vite__createHotContext("/src/App.vue");import { ref } from "/node_modules/.vite/deps/vue.js?v=29721d56" import __vite__cjsImport1_mqtt_dist_mqtt_min from "/node_modules/.vite/deps/mqtt_dist_mqtt__min.js?v=b7b5e482"; const connect = __vite__cjsImport1_mqtt_dist_mqtt_min["connect"] const _sfc_main = { ....
To reproduce, use the example here: https://github.com/mqttjs/MQTT.js/tree/main/examples/vite-example And update the package.json with:
package.json
--- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@esbuild-plugins/node-modules-polyfill": "^0.2.2", - "mqtt": "^5.0.5", + "mqtt": "5.2.0", "process": "^0.11.10", "vue": "^3.3.4" },
then classic
npm install npm run dev
The text was updated successfully, but these errors were encountered:
Try with:
import mqtt from 'mqtt/dist/mqtt.esm'
Sorry, something went wrong.
import mqtt from 'mqtt'
I also created this pr: #1734
So then you will be able to use import mqtt from 'mqtt'
Successfully merging a pull request may close this issue.
Hi,
I use Vite and MQTT.JS in my project and since I updated to
v5.2.0
, I got the following error in Firefox console:To reproduce, use the example here: https://github.com/mqttjs/MQTT.js/tree/main/examples/vite-example
And update the
package.json
with:then classic
The text was updated successfully, but these errors were encountered: