esp32m / core

ESP32 Manager core
MIT License
26 stars 4 forks source link

Build error #10

Closed jetpax closed 11 months ago

jetpax commented 11 months ago

Just found your great project.

Also having build errors due to missing dist/ui ,

Hi, you're right, I use master branch of ESP-IDF. The project is at the very early stage and, to my knowledge, noone uses it for serious stuff except myself. I will introduce versioning to match specific ESP-IDF release sooner or later, but at this point I just want to keep up with the latest ESP-IDF developments. I understand that this may lead to compile errors now and then, but the best I can suggest at the moment is submitting an issue and I will look into it ASAP.

Regarding the UI issue, I was actually going to switch to yarn3, but I don't think the particular problem you were facing is related to yarn. It may have to do with interoperability of tsc, babel and webpack. I'm glad you figured it out. If you have problems compiling UI in the future, I suggest the following: clone the https://github.com/esp32m/ui.git repository and link it to your web-ui folder using yarn link command. This how I always compile the UI, and it works better than with the @esp32m/ui npm module.

Thank you for the input, feel free to contact me if you have any other issues/questions/suggestions.

Originally posted by @dyarkovoy in https://github.com/esp32m/core/issues/4#issuecomment-1423162369

https://github.com/esp32m/ui.git does not exist

....
eeprom,data,153,0x3f0000,4K,
spiffs,data,spiffs,0x3f1000,60K,
*******************************************************************************
[408/1100] Generating dist/index.html.S, dist/main.js.Sesp32m-ui:INFO:using yarn executable /opt/homebrew/bin/yarn
esp32m-ui:INFO:linking /Users/jep/github/core/examples/basic/build/web-ui to /Users/jep/github/core/examples/basic/managed_components/esp32m/web-ui
Usage Error: The nearest package directory (/Users/jep/github/core/examples/basic/build/web-ui) doesn't seem to be part of the project declared in /Users/jep.

- If /Users/jep isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If /Users/jep is intended to be a project, it might be that you forgot to list github/core/examples/basic/build/web-ui in its workspace configuration.
- Finally, if /Users/jep is fine and you intend github/core/examples/basic/build/web-ui to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.

$ yarn link [-A,--all] [-p,--private] [-r,--relative] <destination>
esp32m-ui:INFO:building /Users/jep/github/core/examples/basic/build/web-ui
Usage Error: The nearest package directory (/Users/jep/github/core/examples/basic/build/web-ui) doesn't seem to be part of the project declared in /Users/jep.

- If /Users/jep isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If /Users/jep is intended to be a project, it might be that you forgot to list github/core/examples/basic/build/web-ui in its workspace configuration.
- Finally, if /Users/jep is fine and you intend github/core/examples/basic/build/web-ui to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
[433/1100] Performing configure step for 'bootloader'-- Found Git: /opt/homebrew/bin/git (found version "2.42.1") 
-- The C compiler identification is GNU 12.2.0
...

Any ideas?

dyarkovoy commented 11 months ago

Hi, @jetpax, ESP32M does not use https://github.com/esp32m/ui.git any more, the UI is now located under core/esp32m/web-ui. I'm looking at this line of the log: Usage Error: The nearest package directory (/Users/jep/github/core/examples/basic/build/web-ui) doesn't seem to be part of the project declared in /Users/jep. Do you have package.json file under /Users/jep or in any other folder above /Users/jep/github/core/examples/basic/ ? If so, try to remove it or move the esp32m into a different folder, where no package.json exists up the folder hierarchy. The reason is the way yarn works, it tries to find the common ancestor and unrelated package.json may confuse it

jetpax commented 11 months ago

Doh!, that was it, thank you so much for your patience with a yarn noob who doesn't read error messages... Project builds on MacOS on M1 and runs great on ESP32S3 under esp-idf v5.1.2 It looks really well thought out and implemented, thank you!

dyarkovoy commented 11 months ago

No problem, thank you for confirming that it builds on MacOS, we tested only on Windows/Linux