"Error compiling for Board..."

Lastly

Can you start the IDE from the shell and compile for the "ESP32 DEVKITV1". Copy and paste the output here; it might shine some light on the problem.

Do you have the option to upgrade to IDE 1.8.19. There was a known issues (long ago) but I can't find for which IDE version; see e.g. [SOLVED} Upload Problems with Firebeetle ESP32-E - #2 by ptillisch (and more search results: arduino-builder index out of range - Google Search).