What board do you select in the IDE Tools, Boards menu?
Did you install the ESP32 plug in to the IDE?