Just to add - another fix is to make sure you run require("Storage").eraseAll() on the LHS of the IDE before upload. Now the code will be the first thing in flash memory so even if it gets compacted it won't move and won't cause problems.
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.
Just to add - another fix is to make sure you run
require("Storage").eraseAll()
on the LHS of the IDE before upload. Now the code will be the first thing in flash memory so even if it gets compacted it won't move and won't cause problems.