Ref: Learning ESP32 wit ArduinoIDE page 358
I am out of my depth with this one but found that but winding back the version of the library for One Wire the sketch complies and works. I am using Arduino IDE.
This is my first crack at MQTT and at this stage I would be happy if I can get node red working and drive some LEDs / Relays.
That thread provided a different OneWire library that you could use instead – OneWireNg. It would be a good exercise to change the example code slightly to work with this library.