The ESP8266 in particular doesn't have as much space in the flash to save code to as it does RAM to store the code you have uploaded. So you can get into situations like yours, where your code fits in memory, but you can't save it because even compressed, there's not enough space in the flash for it.
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.
The ESP8266 in particular doesn't have as much space in the flash to save code to as it does RAM to store the code you have uploaded. So you can get into situations like yours, where your code fits in memory, but you can't save it because even compressed, there's not enough space in the flash for it.