esp32 dev borad wont upload becuase of code issue

i am using an esp32 dev board (wemos d1 r32) it does uplod correcetly on most sketches but this one wont. I have gotten one library to turn orange but the blynk one wont even though i have the library, this could be it but the error code is Error compiling for board ESP32 Dev Module. please help

// Motion Detector With Blynk Notifications (WeMos D1 Mini + HC-SR04)
// https://www.instructables.com/id/Motion-Detector-With-Blynk-Notifications-WeMos-D1-/
// If you like the project, please vote for it!
// Have FUN
// @PraetorianCZ

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "Blynk token"; XXX
char ssid[] = "SSID"; XXX
char pass[] = "password"; XXX

//Define name of your sensor and the range you want to be notified at
String location = "Garage";
int rangeMin = 0;
int rangeMax = 50;

// Define HC-SR04 pin numbers
const int echoPin = 6;
const int trigPin = 7;

// Define variables
long duration;
int distance;
int saveDis = 0;

SimpleTimer timer;

void sensorFire() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  saveDis = distance;
  distance = duration * 0.034 / 2;
}

void sensorRead() {
  sensorFire();
  if (rangeMin < distance && distance < rangeMax) {
    sensorFire();
    if (rangeMin < distance && distance < rangeMax) {
      Blynk.notify(String(location) + ": Distance changed from " + String(saveDis) + "cm to " + String(distance) + "cm!");
    }
  }
}

void setup() {
  Blynk.begin(auth, ssid, pass);
  Blynk.notify(String(location) + " connected to: " + String(ssid));
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  timer.setInterval(1000L, sensorRead);
}

void loop() {
  Blynk.run();
  timer.run();
}

You may not be using the correct library for the esp32. Maybe try #include <WiFi.h> instead of #include <ESP8266WiFi.h>. I came across something similar to this trying to run esp32 code on an esp8266 board.

no this also comes out with the same error.

Well, i would try compiling other similar example code for your board and see if you get the same error.