eclipse-paho / eclipse-paho/paho.mqtt.javascript
Creating new client throws "Cannot read property 'Client' of undefined"
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
All is good an well until this line:
`var client = new Paho.MQTT.Client(requestUrl, clientId);`
Where I get the error message
```
Uncaught Error: Cannot read property 'Client' of undefined
at App.initClient (eval at (bundle.js:2341), :201:53)
at App.proxiedMethod (eval at (bundle.js:3565), :44:30)
at eval (eval at (bundle.js:2341), :185:22)
at eval (eval at (bundle.js:4603), :123:23)
at Response.eval (eval at (bundle.js:4651), :258:7)
at Request.eval (eval at (bundle.js:4729), :358:18)
at Request.callListeners (eval at (bundle.js:4687), :105:20)
at Request.emit (eval at (bundle.js:4687), :77:10)
at Request.emit (eval at (bundle.js:4729), :671:14)
at Request.transition (eval at (bundle.js:4729), :22:10)
```
When debugging on the line where Client was supposed to be instantiated, devtools show this:

So I can't figure out what I'm doing wrong. About 95% of this is AWS example code. Any ideas?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.