As @AkosLukacs says that's most likely the problem.
Other things to watch out for:
Have you tried using a different wall adaptor? Some see that very little power is drawn by the device and then try and go into a 'sleep' mode.
Are you using setDeepSleep? If so I'd remove it for now - setDeepSleep will be ignored when connected to USB, but when disconnected it'll take effect and if you have a WiFi connection open it may interfere
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 @AkosLukacs says that's most likely the problem.
Other things to watch out for:
setDeepSleep
? If so I'd remove it for now - setDeepSleep will be ignored when connected to USB, but when disconnected it'll take effect and if you have a WiFi connection open it may interfere