EDIT Thr 2021.04.01
While unsuccessful at finding a specification reference, my comment above is true while in strict mode, and it is strongly suggested Not to create an inner function declaration.
see heading 'Block-level functions in non-strict code' 'In a word: Don't.'
@Ruprect99 I've had this before a few times and it generally seems to point to some flash corruption?
I find that typing "reset(1) -> save()" (could also be "reset(0)") seems to force some kind of clean up algorithm (flash compacting?). That might resolve it.
But the sure way to deal with it is just to reflash the firmware. Make sure to use the "erase_flash" option in esptool before doing so though, just to ensure you reformat the entire flash address space.
I've been flashing ESP's for ages with Espruino and this is the first time I've seen this.
I've got a really simple bit of code:
Just to flash some LED's and listen to a button press, and if I type save in the console to store the code, I just get an endless loop of errors reading this:
in function called from system
Uncaught SyntaxError: Got [ERASED] expected EOF
at line 1 col 1
I'm sure I'm flashing the correct firmware (the V2.08 4mb ESP8266 version)