user48730: After updating ESP32 to core version 2.0.4 (file in Arduino IDE preferences was replaced  tohttps://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json to upgrade), I get the following error:
/Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
/Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp:44:28: error: no matching function for call to 'LITTLEFSImpl::open(const char*&, const char [2])'
     File f = open(path, "r");
                            ^
In file included from /Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp:17:
/Users/guydvir/Library/Arduino15/packages/esp32/hardware/esp32/2.0.4/libraries/FS/src/vfs_api.h:38:17: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
     FileImplPtr open(const char* path, const char* mode, const bool create) override;
                 ^~~~

I minimized code to headers only ( and empty setup and loop:
#include "FS.h"
//#include "LITTLEFS.h" // <----- commenting out stops the error message
#include <time.h>
#include <WiFi.h>
What may be the error and how to fix it ?

user70436: As you experienced, the Lorol's LittleFS_esp32 library was merged into ESP32 core from v1.0.6 and creates compile error to some old codes.
The difference is you have to use #include <LittleFS.h> instead of #include <LITTLEFS.h> for new cores (v1.0.6, v2.0.0+)
Check and modify the following snippet (used widely in my ESP_WiFiManager library ) for your purpose
// Check cores/esp32/esp_arduino_version.h and cores/esp32/core_version.h
//#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) )  //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
  #if (_WIFIMGR_LOGLEVEL_ > 3)
    #warning Using ESP32 Core 1.0.6 or 2.0.0+
  #endif
  
  // The library has been merged into esp32 core from release 1.0.6
  #include <LittleFS.h>       // https://github.com/espressif/arduino-esp32/tree/master/libraries/LittleFS
  
  FS* filesystem =      &LittleFS;
  #define FileFS        LittleFS
  #define FS_Name       "LittleFS"
#else
  #if (_WIFIMGR_LOGLEVEL_ > 3)
    #warning Using ESP32 Core 1.0.5-. You must install LITTLEFS library
  #endif
  
  // The library has been merged into esp32 core from release 1.0.6
  #include <LITTLEFS.h>       // https://github.com/lorol/LITTLEFS
  
  FS* filesystem =      &LITTLEFS;
  #define FileFS        LITTLEFS
  #define FS_Name       "LittleFS"
#endif


48730: <p>After updating ESP32 to core version 2.0.4 (file in Arduino IDE preferences was replaced  to<code>https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json</code> to upgrade), I get the following error:</p>
<pre><code>/Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
/Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp:44:28: error: no matching function for call to 'LITTLEFSImpl::open(const char*&amp;, const char [2])'
     File f = open(path, &quot;r&quot;);
                            ^
In file included from /Users/guydvir/Dropbox/Arduino/libraries/LittleFS_esp32/src/LITTLEFS.cpp:17:
/Users/guydvir/Library/Arduino15/packages/esp32/hardware/esp32/2.0.4/libraries/FS/src/vfs_api.h:38:17: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
     FileImplPtr open(const char* path, const char* mode, const bool create) override;
                 ^~~~
</code></pre>
<p>I minimized code to headers only ( and empty <code>setup</code> and <code>loop</code>:</p>
<p>#include &quot;FS.h&quot;
//#include &quot;LITTLEFS.h&quot; // &lt;----- commenting out stops the error message
#include &lt;time.h&gt;
#include &lt;WiFi.h&gt;</p>
<p>What may be the error and how to fix it ?</p>
 70436: <p>As you experienced, the Lorol's LittleFS_esp32 library was merged into ESP32 core from v1.0.6 and creates compile error to some old codes.</p>
<p>The difference is you have to use <code>#include &lt;LittleFS.h&gt;</code> instead of <code>#include &lt;LITTLEFS.h&gt;</code> for new cores (v1.0.6, v2.0.0+)</p>
<p>Check and modify the following snippet (used widely in my <a href="https://github.com/khoih-prog/ESP_WiFiManager" rel="nofollow noreferrer">ESP_WiFiManager library</a> ) for your purpose</p>
<pre><code>// Check cores/esp32/esp_arduino_version.h and cores/esp32/core_version.h
//#if ( ESP_ARDUINO_VERSION &gt;= ESP_ARDUINO_VERSION_VAL(2, 0, 0) )  //(ESP_ARDUINO_VERSION_MAJOR &gt;= 2)
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) &amp;&amp; (ESP_ARDUINO_VERSION_MAJOR &gt;= 2) )
  #if (_WIFIMGR_LOGLEVEL_ &gt; 3)
    #warning Using ESP32 Core 1.0.6 or 2.0.0+
  #endif
  
  // The library has been merged into esp32 core from release 1.0.6
  #include &lt;LittleFS.h&gt;       // https://github.com/espressif/arduino-esp32/tree/master/libraries/LittleFS
  
  FS* filesystem =      &amp;LittleFS;
  #define FileFS        LittleFS
  #define FS_Name       &quot;LittleFS&quot;
#else
  #if (_WIFIMGR_LOGLEVEL_ &gt; 3)
    #warning Using ESP32 Core 1.0.5-. You must install LITTLEFS library
  #endif
  
  // The library has been merged into esp32 core from release 1.0.6
  #include &lt;LITTLEFS.h&gt;       // https://github.com/lorol/LITTLEFS
  
  FS* filesystem =      &amp;LITTLEFS;
  #define FileFS        LITTLEFS
  #define FS_Name       &quot;LittleFS&quot;
#endif
</code></pre>
