Communicate with other end devices as well as TTN at the same time

I want to write a script to receive data on one WifiLoRA(v2) device from another and then send this same data to a TTN application via OTAA. I can do both tasks separately on two different scripts however I am unable to do both at the same time using the Heltec-ESP32_LoRAWAN example for OTAA.

Whenever I include the heltec.h or LoRa.h libraries (either of which is needed for Node to Node communication) in the provided OTAA code I run into an error

’exit status 1
’DeviceClass_t’ does not name a type’

Screenshot%202022-01-19%20034849

Does anyone have a solution?