Mega +WiFi R3 ATmega2560+ESP8266

this is a compilation error, not an upload error.
you didn't install the esp8266 arduino boards package correctly. use the Boards Manager in IDE to install it