MQTT.js
MQTT.js copied to clipboard
v5 Cannot be used in uniapp, app-plus environments
as shown in the title
node 16 or 20 vue 2.6 mqtt 5.3.1
What's the error you see? Is it on compilation time or runtime? What bundle are you using?
What's the error you see? Is it on compilation time or runtime? What bundle are you using?
mqqt 5.3.1 Introduced like this import mqtt from 'mqtt' With uniapp, running to app-plus android I get the following error
If I introduce it like this const mqtt = require("mqtt")
uniapp official website https://uniapp.dcloud.net.cn/
What's the error you see? Is it on compilation time or runtime? What bundle are you using?
uniapp only supports es in android environment, not webapi. i see a lot of window, Navigator and other webapi in the packaged file, it should be these that cause the error.
language is not present in source code so sincerly I have no clue what that error means
language is not present in source code so sincerly I have no clue what that error means
Inside the packaged code is Navigator.language
language is not present in source code so sincerly I have no clue what that error means
Feel free to submit a PR to fix your issue
Feel free to submit a PR to fix your issue
It could be caused by using this plugin esbuild-plugin-polyfill-node when packing the package But I'm not familiar with esbuild, could you please pay attention to it?
Try with v 5.3.6