ESP32 needs a lot power during WiFi.
Its a ESP32 problem not related to Espruino.
Check your power supply.
Search for ESP32 brownout on google, or on the Espressif forum (https://esp32.com/)
© Espruino, powered by microcosm.
Report a problem