Make sure you have the correct port for the ESP8266 selected from the Arduino IDE's Tools > Port menu.
If you don’t know which port it is, you can find it like this:
- Unplug your Arduino board from the computer.
- Select Tools > Port from the Arduino IDE's menus.
- Note the ports, if any, listed in the menu.
- Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
- Plug your Arduino board into the computer.
- Select Tools > Port from the Arduino IDE's menus. - The new port listed in the menu is your Arduino board.