PlatformIO Community

Firebase library add issue arduino mobitz

Hi

I tried added mobitz firebase library but i cant.
Always gives error in Arduino framework.
platform ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = mobizt/Firebase ESP32 Client@^4.0.0

monitor_speed = 115200

error:

 #include <SPIFFS.h>
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib468\Firebase ESP32 Client\signer\Signer.cpp.o] Error 1
*** [.pio\build\esp32dev\lib468\Firebase ESP32 Client\rtdb\QueryFilter.cpp.o] Error 1
In file included from .pio/libdeps/esp32dev/Firebase ESP32 Client/src/session/FB_Session.cpp:33:
.pio/libdeps/esp32dev/Firebase ESP32 Client/src/FirebaseFS.h:26:10: fatal error: SPIFFS.h: No such file or directory

****************************************************************
* Looking for SPIFFS.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:SPIFFS.h"
* Web  > https://registry.platformio.org/search?q=header:SPIFFS.h
*
****************************************************************

 #include <SPIFFS.h>
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib468\Firebase ESP32 Client\session\FB_Session.cpp.o] Error 1
In file included from .pio/libdeps/esp32dev/Firebase ESP32 Client/src/FB_Net.h:10,
                 from .pio/libdeps/esp32dev/Firebase ESP32 Client/src/wcs/esp32/FB_TCP_Client.h:36,
                 from .pio/libdeps/esp32dev/Firebase ESP32 Client/src/wcs/esp32/FB_TCP_Client.cpp:36:
.pio/libdeps/esp32dev/Firebase ESP32 Client/src/FirebaseFS.h:26:10: fatal error: SPIFFS.h: No such file or directory

****************************************************************
* Looking for SPIFFS.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:SPIFFS.h"
* Web  > https://registry.platformio.org/search?q=header:SPIFFS.h
*
****************************************************************

 #include <SPIFFS.h>
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib468\Firebase ESP32 Client\wcs\esp32\FB_TCP_Client.cpp.o] Error 1

Since the library uses conditional macros for including the sub-libraries

you have to set lib_ldf_mode accordingly in the platformio.ini, e.g.,

lib_ldf_mode = chain+
1 Like