ESP Failed to connect if attached with sensors

I'm trying to load a small code on my ESP826 but I meet this error

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

But only when I'm trying to compile the code while Sensor are attached. If I connect the ESP alone it works...
I already reinstalled all drivers and libraries what shall I do?

With the little information at hand I would expect the sensors are:

  1. Dragging down the supply to the board.
  2. Generating noise
  3. Causing a ground loop of some sort.

I suggest you post your sensor types and how they are connected and powered.

I tried to reprogram TX and RX while using serial. that was enough not to make it compile.
thx anyway for the answer