Mega2560 with a ESP 8266 Shield - Errors verifying build

Hi,
Serial 1 not going to work for mega+esp8266 shield.

You need change it to Serial 3 .
And read this topic, maybe will help you.