Arduino Nano ESP32 does not compile Ethernet sample files

Please help me understand the problem!
I can't compile any of the Ethernet sample files.
The constant error is "EthernetServer server(80);"
I have tried many different libraries, the result is the same,
all other examples compile and work without problems!
this code in the Arduino NANO 328 board also works without problems,
what could be the reason?

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192, 168, 1, 177);
EthernetServer server(80);

void setup() {
  Serial.begin(9600);
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop() {
}

try my EthernetESP32 library

I tried this library, the result is the same,
there is an error with the "Arduino Nano ESP32"
board, there are no problems with other boards!

can you check the compilation with this board without connecting the board itself?

Are these the samples you are trying?

Are you sure you picked the right board, the ARDUINO board has NO ethernet examples, but the Espressif board of the same name does.

Yes, I'm sure the board is selected correctly,
there are no problems with any other ones!

which is typical if I have one line, for example..
EthernetServer server(5005) on EthernetClient clients[3];
then the compilation is error-free.,
that is, the problem is in the line EthernetServer server(5005)

There are TWO boards named Arduino Nano ESP32 as I just showed you in the post #5. The Espressif board has lots of Ethernet examples. The Arduino board does NOT.
Goto the board selector, enter 'nano esp32' and do a screen grab of the two Arduino Nano ESP32 entries including the light grey part after that shows which is which. Is the screen grab the same as mine in post #5? Did you click the first entry that is marked as Arduino?

sonofcy, It looks like I understood you, and I got a compilation!
I am very grateful for your help!

I don't know why they named them the same, several folks have tripped on that. Did you mark my post as the solution?

I have another problem with this board!
I can't combine LAN and CAN, one thing works with one board,
the other, the other, how can I solve this problem, please tell me?
The file from the sample library is not compiled!

The issue is resolved!
You need to replace line 254 in the Ethernet.h file.
class EthernetServer : public Server
on
class EthernetServer : public Print