Error compiling arduino editor but not IDE

Here is a code that is much more trimmed down, but I still get basically the same error...I think

Code:

#include <ESP_Mail_Client.h>
#include <ESP_Mail_FS.h>
#include <SDK_Version_Common.h>

#include <Arduino.h>
#if defined(ESP32)
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
#include <ESP_Mail_Client.h>

#define SMTP_HOST "smtp.gmail.com"
#define SMTP_PORT 465

#define AUTHOR_EMAIL ""
#define AUTHOR_PASSWORD "apxzjzlq"

#define RECIPIENT_EMAIL ""

#include <ESP8266WiFi.h>
#include <ArduinoOTA.h>

const char* ssid = "";
const char* password = "";

String header;

String output5State = "off";
String output4State = "off";


WiFiServer server(80);
IPAddress ip(192, 168, 1, 131); // where xx is the desired IP Address
IPAddress gateway(192, 168, 1, 1); // set gateway to match your network

unsigned long currentMillis;
unsigned long previousMillis;
unsigned long previousTime = 0;
const long timeoutTime = 2000;

volatile boolean TestEmail = false;
volatile boolean Running = true;

/* The SMTP Session object used for Email sending */
SMTPSession smtp;

void setup() {
  Serial.begin(115200);

  Serial.println("Starting, 5 minute wait before compressor will come on");
  Serial.print(F("Setting static ip to : "));
  Serial.println(ip);

  // Connect to WiFi network
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  IPAddress subnet(255, 255, 255, 0); // set subnet mask to match your network
  //WiFi.config(ip, gateway, subnet);
  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  // Start the server
  server.begin();
  Serial.println("Server started");

  // Print the IP address
  Serial.print("Use this URL : ");
  Serial.print("http://");
  Serial.print(WiFi.localIP());
  Serial.println("/");

  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  // attempt to connect to WiFi network
  Serial.println();
  Serial.print("Connecting to WiFi...");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  // show WiFi status in serial monitor
  Serial.println("");
  Serial.println("WiFi connected.");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  ArduinoOTA.begin();
}

void loop() {
  ArduinoOTA.handle();

  currentMillis = millis();

  WiFiClient client = server.available();   // Listen for incoming clients

}

Here is the error:

/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:d1_mini:baud=921600,dbg=Disabled,eesz=4M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/496596365/build --build-path /tmp/arduino-build-5B1550D0BB86DCFECBD0862D865FD98D --library /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client --library /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/RTClib /tmp/496596365/sketch_oct22a

Using library ArduinoOTA at version 1.0 in folder: /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/ArduinoOTA

Using library ESP8266mDNS at version 1.2 in folder: /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/ESP8266mDNS

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp: In member function 'bool ESP_Mail_Client::openFileRead(SMTPSession*, SMTP_Message*, SMTP_Attachment*, File&, std::string&, std::string&, const string&, bool)':

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:2995:12: error: no match for 'operator=' (operand types are 'File' and 'fs::File')

file = ESP_MAIL_FLASH_FS.open(filepath.c_str(), "r");

^

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:2995:12: note: candidates are:

In file included from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.h:59:0,

from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:43:

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(const File&)

class File : public Stream {

^

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'const File&'

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(File&&)

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'File&&'

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp: In member function 'bool ESP_Mail_Client::openFileRead2(SMTPSession*, SMTP_Message*, File&, const char*, esp_mail_file_storage_type)':

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:3065:12: error: no match for 'operator=' (operand types are 'File' and 'fs::File')

file = ESP_MAIL_FLASH_FS.open(filepath.c_str(), "r");

^

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:3065:12: note: candidates are:

In file included from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.h:59:0,

from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:43:

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(const File&)

class File : public Stream {

^

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'const File&'

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(File&&)

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'File&&'

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp: In member function 'void ESP_Mail_Client::saveHeader(IMAPSession*)':

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:6308:12: error: no match for 'operator=' (operand types are 'File' and 'fs::File')

file = ESP_MAIL_FLASH_FS.open(headerFilePath.c_str(), "w");

^

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:6308:12: note: candidates are:

In file included from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.h:59:0,

from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:43:

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(const File&)

class File : public Stream {

^

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'const File&'

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(File&&)

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'File&&'

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp: In member function 'bool ESP_Mail_Client::handleAttachment(IMAPSession*, char*, int, int&, File&, std::string&, bool&, int&, int&, int&, int&, int&)':

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:6638:14: error: no match for 'operator=' (operand types are 'File' and 'fs::File')

file = ESP_MAIL_FLASH_FS.open(filePath.c_str(), "w");

^

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:6638:14: note: candidates are:

In file included from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.h:59:0,

from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:43:

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(const File&)

class File : public Stream {

^

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'const File&'

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(File&&)

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'File&&'

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp: In member function 'void ESP_Mail_Client::decodeText(IMAPSession*, char*, int, int&, File&, std::string&, bool&, int&, int&, int&)':

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:7046:22: error: no match for 'operator=' (operand types are 'File' and 'fs::File')

file = ESP_MAIL_FLASH_FS.open(filePath.c_str(), "w");

^

/mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:7046:22: note: candidates are:

In file included from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.h:59:0,

from /mnt/create-efs/webide/78/b6/78b6874e2766049830514ce3b420c195:neketege88/libraries_v2/ESP Mail Client/src/ESP_Mail_Client.cpp:43:

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(const File&)

class File : public Stream {

^

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'const File&'

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: File& File::operator=(File&&)

/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/SD/src/SD.h:26:7: note: no known conversion for argument 1 from 'fs::File' to 'File&&'

Error during build: exit status 1

I will look and see what I can find.

Thanks!