As @MaBe says - this is probably as it says - the ESP8266 is quite restricted with RAM so it's running out of memory.
Likely you are uploading to RAM and if you upload to Flash that will help, but using tinyMQTT will help too
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As @MaBe says - this is probably as it says - the ESP8266 is quite restricted with RAM so it's running out of memory.
Likely you are uploading to RAM and if you upload to Flash that will help, but using tinyMQTT will help too