Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.78k stars 3.18k forks source link

Error html_ui.h when building WLED-0_15 #3939

Closed JonnyTech closed 5 months ago

JonnyTech commented 5 months ago

What happened?

Tring to build WLED-0_15 terminates with an error wled00/wled_server.cpp:3:21: fatal error: html_ui.h: No such file or directory

To Reproduce Bug

Open source folder in VS Code Open platformio.ini Modify for required env:

# CI/release binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, esp32dev, esp32_eth, esp32dev_audioreactive, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover
default_envs = esp32_eth

Click build Wait for error

Expected Behavior

Compilation should complete correctly as per instructions at https://kno.wled.ge/advanced/compiling-wled/

Install Method

Self-Compiled

What version of WLED?

v0.15.0-b3

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

*  Executing task: platformio run --environment esp32_eth 

Processing esp32_eth (board: esp32-poe; platform: espressif32@3.5.0; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
*** use existing my_config.h ***
npm run build

> wled@0.15.0-b3 build
> node tools/cdata.js

node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'inliner'
Require stack:
- /tmp/WLED-0_15/tools/cdata.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/tmp/WLED-0_15/tools/cdata.js:20:17)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/tmp/WLED-0_15/tools/cdata.js' ]
}

Node.js v20.12.2
*** Error 1
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-poe.html
PLATFORM: Espressif 32 (3.5.0) > OLIMEX ESP32-PoE
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 0.0.0+sha.4b0c087 
 - tool-esptoolpy @ 1.30100.210531 (3.1.0) 
 - toolchain-xtensa32 @ 2.50200.97 (5.2.0)
Converting wled00.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- LittleFS_esp32 @ 1.0.6+sha.f0817ca
|-- AsyncTCP @ 1.2.0+sha.38b8475
|-- FastLED @ 3.6.0
|-- IRremoteESP8266 @ 2.8.2
|-- NeoPixelBus @ 2.7.9
|-- ESPAsyncWebServerWLED @ 2.2.1+sha.6d2540d
|-- QuickEspNow @ 0.6.2+sha.aa61f26
|-- Wire @ 1.0.1
|-- SD(esp32) @ 1.0.5
|-- SD_MMC @ 1.0
|-- SPI @ 1.0
|-- EEPROM @ 1.0.3
|-- ArduinoOTA @ 1.0
|-- DNSServer @ 1.1.0
|-- ESPmDNS @ 1.0
|-- WiFi @ 1.0
|-- ESP32 Async UDP @ 1.0.0
|-- WebServer @ 1.0
Building in release mode
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/FastLED.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/bitswap.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/colorpalettes.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/colorutils.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/hsv2rgb.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/lib8tion.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/noise.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/platforms.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/platforms/esp/32/clockless_rmt_esp32.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/power_mgt.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib93c/FastLED/wiring.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/FX.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/FX_2Dfcn.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/FX_fcn.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/alexa.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/bus_manager.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/button.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/cfg.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/colors.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/dmx.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/e131.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/file.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/hue.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/improv.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/ir.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/json.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/led.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/lx_parser.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/mqtt.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/net_debug.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/network.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/ntp.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/overlay.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/pin_manager.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/playlist.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/presets.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/remote.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/set.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/ConnAckPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PingRespPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubAckPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubCompPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRecPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRelPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PublishPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/SubAckPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/UnsubAckPacket.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/dmx/ESPDMX.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/dmx/SparkFunDMX.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/e131/ESPAsyncE131.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/espalexa/EspalexaDevice.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/network/Network.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/time/DS1307RTC.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/time/DateStrings.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/time/Time.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/src/dependencies/timezone/Timezone.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/udp.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/um_manager.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/usermod.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/usermods_list.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/util.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/wled.cpp.o' from cache
Compiling .pio/build/esp32_eth/src/wled00.ino.cpp.o
Retrieved `.pio/build/esp32_eth/src/wled_eeprom.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/wled_math.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/wled_serial.cpp.o' from cache
Compiling .pio/build/esp32_eth/src/wled_server.cpp.o
Retrieved `.pio/build/esp32_eth/src/ws.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/src/xml.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/partitions.bin' from cache
Retrieved `.pio/build/esp32_eth/lib07c/FS/FS.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/lib07c/FS/vfs_api.cpp.o' from cache
Retrieved `.pio/build/esp32_eth/libf9f/LittleFS_esp32/LITTLEFS.cpp.o' from cache
Archiving .pio/build/esp32_eth/lib07c/libFS.a
Indexing .pio/build/esp32_eth/lib07c/libFS.a
Retrieved `.pio/build/esp32_eth/libf9f/LittleFS_esp32/esp_littlefs.c.o' from cache
Retrieved `.pio/build/esp32_eth/libf9f/LittleFS_esp32/lfs.c.o' from cache
Compiling .pio/build/esp32_eth/libf9f/LittleFS_esp32/lfs_util.c.o
Compiling .pio/build/esp32_eth/libf9f/LittleFS_esp32/littlefs_api.c.o
wled00/wled_server.cpp:3:21: fatal error: html_ui.h: No such file or directory

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

compilation terminated.
*** [.pio/build/esp32_eth/src/wled_server.cpp.o] Error 1
Compiling .pio/build/esp32_eth/lib278/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/AsyncTCP.cpp.o
============================================================== [FAILED] Took 6.57 seconds ==============================================================

Environment    Status    Duration
-------------  --------  ------------
esp32_eth      FAILED    00:00:06.573
========================================================= 1 failed, 0 succeeded in 00:00:06.573 =========================================================

 *  The terminal process "platformio 'run', '--environment', 'esp32_eth'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

Anything else?

This builds correctly: Build 2404040 WLED 0.14.3 release

Code of Conduct

dosipod commented 5 months ago

@JonnyTech There was a change in 15 for ui build which is automated now image

You can look at the source here https://github.com/Aircoookie/WLED/tree/0_15 with the changes , if you compile that it will work , I do not compile on VSC but only on github

JonnyTech commented 5 months ago

Thanks for your reply. Sorry, I am not a developer and was just following instructions the compiling guide.

So the section is there in platformio.ini:

[scripts_defaults]
extra_scripts =
  pre:pio-scripts/set_version.py
  post:pio-scripts/output_bins.py
  post:pio-scripts/strip-floats.py
  pre:pio-scripts/user_config_copy.py
  pre:pio-scripts/build_ui.py

Do I need to change it for compilation to succeed?

Should I be using something else to compile locally?

JonnyTech commented 5 months ago

Looking through the rest of the documentation, I found this:

https://github.com/Aircoookie/WLED/wiki/Add-own-functionality#changing-web-ui

Changing Web UI

In order to conserve space, the Web UI interface is represented as a series of wled00/html_ui.h, wled00/html_settings.h and wled00/html_other.h files which contain C/C++ strings with specific parts of the Web UI.

These files are automatically created from source files available in wled00/data folder. To generate files, install [NodeJS 11.0+](https://nodejs.org/en/download/) globally. After that, recreate html_*.h files by running in the repo directory:

> npm install
> npm run build

After running those two commands, it now compiles correctly.

When I have a moment, I shall create a PR for the documentation.

blazoncek commented 5 months ago

Wiki is no longer used.

JonnyTech commented 5 months ago

Wiki is no longer used.

Thanks @blazoncek.

Yes, indeed, as stated in my first post, the guide was not on the wiki:

https://kno.wled.ge/advanced/compiling-wled/

But the tip to execute the npm commands was found on the wiki.

Aircoookie commented 5 months ago

npm install is the last item in the "Preparation" section on https://kno.wled.ge/advanced/compiling-wled/

Perhaps it is a bit easy to miss, and I would love for npm to run install automatically on first build in a fresh environment, so that step can be omitted. Maybe I can figure something out.

JonnyTech commented 5 months ago

Thanks @Aircoookie - my bad, I completely missed it.

While you are here, the reason that I am trying to recompile WLED is so that I can adapt the serial API to accept cfg JSON so that I can change the IP address. Is this possible at all?