Enable Huge APP (NO OTA)
Use the partition scheme Huge App (NO OTA) under Tools -> Board after selecting ESP32 Dev Module so that there is enough memory for the program to upload along with you other extensions.
Upgrade to latest ESP32 board package
Make sure to update your board definitions to latest version, as new versions introduce new changes.