@peekay123, thanks a lot, once again you solved my problem. I have already debugged so many issues thanks to your numerous posts on this forum!!
So here is what happened. I just bought an electron and added it to my account. Because of this, there is no device selected by default when you compile, and the compiler finds random errors that did not exist before. That's what confused me.
The second issue is that the memory summary is only valid for a Core, even if I select a photon it does not show the extra RAM and you can thus use more than 100% of it.
Bug report for particle folks:
-force device selection before compiling otherwise compiler finds fake error
-update flash and RAM usage based on the device used