eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.14k stars 468 forks source link

Incorrect Library Export when using require-js #163

Closed ReshiIRE closed 5 years ago

ReshiIRE commented 6 years ago

Hello,

I recently upgraded the Paho.MQTT.JavaScript library through the paho-mqtt NPM package to version 1.0.4 so that I could use the built in reconnect functionality. However, in doing so I discovered two issues:

The library now required me to assign a namespace to it; that upon subscription the library would trigger the connectionLost callback, complaining that 'Paho is not defined'.

I narrowed down the issue to the library not being able to internally see the Message class, as when using require(), Paho.MQTT is not defined in the global scope, as it would when using the library through a simple Githubissues.

  • Githubissues is a development platform for aggregating issues.