Hieromon / PageBuilder

An arduino library to create html string in the sketch for ESP8266/ESP32 WebServer.
MIT License
193 stars 40 forks source link

LittleFS.h missing in PageBuilder1.4.2 #22

Closed MingKoo closed 3 years ago

MingKoo commented 4 years ago
PLATFORM: Espressif 8266 2.0.4 > WeMos D1 mini Lite
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
 - framework-arduinoespressif8266 2.20500.190223 (2.5.0)
 - tool-esptool 1.413.0 (4.13)
 - toolchain-xtensa 1.40802.0 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
LibraryManager: Installing id=2010
Using cache: /Users/MingKoo/.platformio/.cache/a0/d683bcd4a390783251b8d6c741f16fa0
Unpacking...
PageBuilder @ 1.4.2 has been successfully installed!
Found 71 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <PageBuilder> 1.4.2
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <AutoConnect> 1.1.7
|   |-- <PageBuilder> 1.4.2
|   |   |-- <ESP8266WebServer> 1.0
|   |   |   |-- <ESP8266WiFi> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson> 6.16.1
|   |-- <ESP8266WiFi> 1.0
|   |-- <SD(esp8266)> 1.0.5
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <EEPROM> 1.0
|   |-- <Ticker> 1.0
|   |-- <ESP8266HTTPClient> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266httpUpdate> 1.3
|   |   |-- <ESP8266HTTPClient> 1.2
|   |   |   |-- <ESP8266WiFi> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio/build/d1_mini_lite/src/ota.cpp.o
Compiling .pio/build/d1_mini_lite/lib4f3/PageBuilder/PageBuilder.cpp.o
.pio/libdeps/d1_mini_lite/PageBuilder/src/PageBuilder.cpp:18:22: fatal error: LittleFS.h: No such file or directory
******************************************************************
* Looking for LittleFS.h dependency? Check our library registry!
**
* CLI  > platformio lib search "header:LittleFS.h"
* Web  > https://platformio.org/lib/search?query=header:LittleFS.h
*
******************************************************************
 #include <LittleFS.h>
compilation terminated.

Can't  compile, How can I fix it ?  Thanks.
Hieromon commented 4 years ago

Since PageBuilder 1.4.2 with ESP8266, the default file system has changed SPIFFS to LittleFS. https://github.com/Hieromon/PageBuilder/releases/tag/v1.4.2

Your posted log said:

PLATFORM: Espressif 8266 2.0.4 > WeMos D1 mini Lite

My understanding is that PlatformIO's Espressif 8266 2.0.4 is based on Arduio core 2.5.0. If you are using esp8266 2.5.0 (maybe 2.5.1) or earlier, you need to specify SPIFFS as the default file system with platformio.ini.

build_flags = -DPB_USE_SPIFFS
Hieromon commented 3 years ago

Explicit properly usage of SPIFFS and LittleFS is supported by Arduino core as well as Page Builder 1.4.2. It has already been solved by the PB_USE_SPIFFS definition. You will not be consistent with the default filesystem of Arduino core unless you present filesystem=littlefs with platformio.ini.