Arduino IDE 2 beta 7 Error when compiling

I wouldn't trust that either. Download the real IDE v1.8.15 to your PC and try it on that.

Also, as I already requested, tell us which "Arduino" board your attempting to compile for.