I keep getting the error fatal error: wl_definitions.h: No such file or directory. Can someone please help me

Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:28:10: fatal error: wl_definitions.h: No such file or directory
#include <wl_definitions.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Uno.

#include <ESP8266WiFi.h>
#include "AdafruitIO_WiFi.h"
#include <Servo.h>
#define WIFI_SSID       ""
#define WIFI_PASS       ""
 
#define IO_USERNAME  ""
#define IO_KEY       ""

Servo servo1;
//Connect to Wi-Fi and Adafruit IO handel 
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
 
// Create a feed object that allows us to send data to
AdafruitIO_Feed *OliieTreat = io.feed("feed/ollie");
void setup() {
  servo1.attach(9);
 Serial.begin(115200);
 
  // Connect to Adafruit IO
  io.connect();
 
  // wait for a connection
  while(io.status() < AIO_CONNECTED) 
 {
   Serial.print(".");
    delay(500);
 }
}

void loop() {
  // put your main code here, to run repeatedly:
  io.run();
 if(OliieTreat->isPressed())
{
   
     servo1.attach(9);
     servo1.write(0); 
      delay(1000);
      servo1.detach()(9);
       delay(5000);
       
    }
  
}

Have you got the correct board selected?

yes

So you’re using an Uno… and you’re trying to use a library for an ESP8266…

That won't work.

I have an esp8266 connected to it

This would indicate that you have an Uno board selected.

yes

If you are using an ESP8266... you need to select an ESP8266 board from the board manager.

If you select an "Uno" board then it won't work.

I get this error now
fatal error: ArduinoHttpClient.h: No such file or directory
27 | #include "ArduinoHttpClient.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Generic ESP8266 Module.

Did you include that library?

ok it works thanks