ESPHome - problems to compile

Hello,
since one of the last updates of ESPHome I’m not anymore able to compile my nodes. Same issue appears with all the nodes. In the past was working without any problems …
During compilation I get following issue:

INFO Reading configuration /config/esphome/gartensensor2.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing gartensensor2 (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 2.6.2)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 2.0.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266WiFi> 1.0
|-- <AsyncMqttClient-esphome> 0.8.6
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/adc/adc_sensor.cpp.o
In file included from src/esphome/components/adc/adc_sensor.h:3:0,
                 from src/esphome/components/adc/adc_sensor.cpp:1:
src/esphome/core/component.h:3:18: fatal error: string: No such file or directory
 #include <string>
                  ^
compilation terminated.
Compiling /data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/captive_portal/captive_portal.cpp.o
In file included from src/esphome/components/captive_portal/captive_portal.cpp:3:0:
src/esphome/components/captive_portal/captive_portal.h:5:18: fatal error: memory: No such file or directory
 #include <memory>
                  ^
compilation terminated.
Compiling /data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/deep_sleep/deep_sleep_component.cpp.o
*** [/data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/adc/adc_sensor.cpp.o] Error 1
*** [/data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/captive_portal/captive_portal.cpp.o] Error 1
Compiling /data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/dht/dht.cpp.o
In file included from src/esphome/components/deep_sleep/deep_sleep_component.h:3:0,
                 from src/esphome/components/deep_sleep/deep_sleep_component.cpp:1:
src/esphome/core/component.h:3:18: fatal error: string: No such file or directory
 #include <string>
                  ^
compilation terminated.
*** [/data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/deep_sleep/deep_sleep_component.cpp.o] Error 1
In file included from src/esphome/components/dht/dht.h:3:0,
                 from src/esphome/components/dht/dht.cpp:1:
src/esphome/core/component.h:3:18: fatal error: string: No such file or directory
 #include <string>
                  ^
compilation terminated.
*** [/data/gartensensor2/.pioenvs/gartensensor2/src/esphome/components/dht/dht.cpp.o] Error 1
========================== [FAILED] Took 6.92 seconds ==========================

Anybody discovered similar topics?

tried a clean build yet?

I tried already. Same problem …

You could try to upgrade platformio (or re-install esphome if you rund the hassio addon).

Looks like esphome has troubles finding some files needed so to me the installation is somewhat messed up.

I have the same feeling. i will try tomorrow to reinstall EspHome.

What version of esphome?

I use Current version: 2021.10.2

I have solved it now. Simply did a deinstall in Supervisor of complete ESPHome package. Afterwards I have reinstalled it. All my nodes automatically reappeared. Now I can again recompile without errors!