WiFi.h PINS_COUNT error

Hi - on the face of it a simple one. I want to introduce a WiFi connection into a project. Examples I’ve seen all identify to #include <WiFi.h>. Using the Online IDE, having stripped out all other code leaving just:

#include <WiFi.h>

void setup() {
  
}

void loop() {
 ;
}

this fails to compile with:

error: 'PINS_COUNT' was not declared in this scope.

There are clues in the trace window but as I am simply using the Online IDE, nothing that I can do anything about. Am I missing some other essential #include ?

Multiple libraries were found for "WiFi.h"
Used: /home/builder/opt/libraries/latest/wifinina_1_5_0
Not used: /home/builder/opt/libraries/latest/wifiespat_1_1_2
Not used: /home/builder/opt/libraries/latest/wifi_1_2_7
Using library wifinina_1_5_0 at version 1.5.0 in folder: /home/builder/opt/libraries/latest/wifinina_1_5_0 
Using library SPI at version 1.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.2/libraries/SPI 
/home/builder/opt/libraries/latest/wifinina_1_5_0/src/utility/spi_drv.cpp: In static member function 'static void SpiDrv::begin()':
/home/builder/opt/libraries/latest/wifinina_1_5_0/src/utility/spi_drv.cpp:87:24: error: 'PINS_COUNT' was not declared in this scope
if (SLAVERESET > PINS_COUNT) {

Best regards, Andrew

do you have an old Arduino WiFi Shield?
what board is selected?

it is a bug. the builder should use the wifi_1_2_7 library, if you only include WiFi.h

Thank you. Apologies, I meant to say, Uno is selected and the WiFi shield is a "compatible" but using the ESP8266MOD module.

Andrew_Hodge:
Thank you. Apologies, I meant to say, Uno is selected and the WiFi shield is a "compatible" but using the ESP8266MOD module.

the WiFi library is only for the old Arduino WiFi Shield.
for the esp8266 shield you can use the old WiFiEsp library or my new WiFiEspAT library if you update the firmware in the esp8266 to version 1.7.x (SDK 3)

EDIT: other options are WiFiLink firmware and library or your own sketch in esp8266.

to work with this shied you must understand that it works over Serial or SoftwareSerial.

Back to this eventually ! Thanks very much for the help. WiFiEsp library did, as you suggested, compile correctly (on the Web IDE). My understanding has grown further through reading various snippets on the internet to the point where I realised that my board (a D1 compatible) is a full-blown development board in its own right that is supported via the Arduino IDE (I've had to leave the Web IDE behind for this). I still don't understand whether the D1 can be used as a serially controlled (via AT command set) WiFi (only) module and if so which of its pins provide the Rx and Tx interface as there are three Tx and two Rx marked on the board, or even the USB interface via the CH340 (and whether to do so it needs different firmware downloading to it) - this would be interesting to know. That said, I'm happy that I have a WiFi connection established using the ESP8266WiFi library. I'm not sure what the protocol is for concluding an enquiry but thanks again for the help.