-
• #2
Are you entering this in the right hand side and uploading?
I think you might be doing this on the left hand side of the ide.
The module needs to be uploaded first - there's the module not found...
-
• #3
I am entering it on the right side.
Actually, I can see the text of the error inside MQTT.min.js, line 9 col 201:
"...t,a);a.connect();return a}});"Obviously it finds the module, tries to load it and because of syntax errors it fails to load it. Then in my code it reports that the module cannot be found:
var mqtt = require("MQTT").create("192.168.1.10");Please try it if you can.
-
• #4
Sounds like you turned on
Modules uploaded as functions (BETA)
in the Web IDE. Turn it off, or use cutting edge build, and you'll be fine.It'd be worth turning off everything marked as
BETA
in settings - especially the NPM one -
• #5
Thank you, Gordon. That worked.
Trying to load MQTT on ESP8266/Espruino reports an error. Here is what I put in the IDE:
var mqtt = require("MQTT").create("192.168.1.10");
when I try to upload this script I get:
I opened to see where the error is, and it definitely reports on something inside MQTT.min.js . Please help.
Thanks,
Jordan