I'm not infront of my computer at the moment to check the require code.
However the issue would seem to be that you were uploading your code,
running onInit() manually, and then calling save()?
When I was getting the issue all I was doing was hitting the upload button then type save().
Now that I changed the Save on Send setting to "Direct to Flash (execute code at boot)" I haven't seen that Error again.
That could likely cause you other issues (like having multiple
instances of the MQTT library kicking around), so I wonder how much
it's worth bloating the MQTT lib to try and avoid that.
Honestly, I wouldn't spend too much time on that. I'm the only one that seemed to run across that issue. And hooking the pico into an external supply doesn't hang while waiting for text to be dumped, so it runs as expected.
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.
I'm not infront of my computer at the moment to check the require code.
When I was getting the issue all I was doing was hitting the upload button then type save().
Now that I changed the Save on Send setting to "Direct to Flash (execute code at boot)" I haven't seen that Error again.
Honestly, I wouldn't spend too much time on that. I'm the only one that seemed to run across that issue. And hooking the pico into an external supply doesn't hang while waiting for text to be dumped, so it runs as expected.