Pls i need help for this error

when i try upload the code :
Using board 'esp32' from platform in folder: C:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2
Using core 'esp32' from platform in folder: C:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2
Detecting libraries used...
"C:\Users\marco\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/config" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/app_trace" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/app_update" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/asio" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/bootloader_support" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/bt" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/coap" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/console" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/driver" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp-tls" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp32" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_adc_cal" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_event" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_http_client" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_http_server" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_https_ota" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_ringbuf" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/ethernet" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/expat" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/fatfs" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/freemodbus" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/freertos" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/heap" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/idf_test" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/jsmn" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/json" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/libsodium" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/log" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/lwip" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mbedtls" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mdns" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/micro-ecc" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mqtt" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/newlib" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/nghttp" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/nvs_flash" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/openssl" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/protobuf-c" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/protocomm" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/pthread" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/sdmmc" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/smartconfig_ack" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/soc" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/spi_flash" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/spiffs" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/tcp_transport" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/tcpip_adapter" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/ulp" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/vfs" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wear_levelling" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wifi_provisioning" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wpa_supplicant" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/xtensa-debug-module" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp32-camera" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp-face" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/fb_gfx" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32" "-IC:\Users\marco\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\variants\esp32" "C:\Users\marco\AppData\Local\Temp\arduino-sketch-A34B326C5214047F2D775166CBB5FC0E\sketch\1.all_code.ino.cpp" -o nul
Alternatives for WiFi.h:
ResolveLibrary(WiFi.h)
-> candidates:

Compilation error: Error: 2 UNKNOWN: exit status 1

@mahmoud0100, your topic has been moved to a more suitable location on the forum; compilation errors don't relate to Avrdude nor to stk500 nor to the bootloader.

Why are you using IDE2.0 which is currently a beta version? You're probably a lot better of using IDE 1.8.15.

What code would that be ?

The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

It looks to me like the linker can't find a "WiFi.h" that works on the "ESP32_DEV" board. Perhaps it needs "WiFiNINA.h" instead?

Arduino: 1.8.12 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 115200, None"

Sketch uses 981614 bytes (74%) of program storage space. Maximum is 1310720 bytes.
Global variables use 39500 bytes (12%) of dynamic memory, leaving 288180 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM1
Traceback (most recent call last):
File "esptool.py", line 3682, in
File "esptool.py", line 3675, in main
File "esptool.py", line 3329, in main
File "esptool.py", line 263, in init
File "site-packages\serial_init
.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM1': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Specified folder/zip file does not contain a valid library
no protocol: pip install esptool

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

That's weird.

Start off with the ESP32 unplugged from the USB port and the Arduino IDE closed.

Open the IDE, note the serial ports, plug in the ESP32 does a new serial port show up?