In my project, I have this /lib/messages/library.json
file, which specifies two libraries that are available from the main platformio page:
{
"name": "messages",
"build": {
"extraScript": "build.py"
},
"dependencies": [
{
"name": "nanopb-arduino",
"version": "1.0.0"
},
{
"name": "PacketIO",
"version": "0.1.0"
}
]
}
But when I try to build, I get the error
$ pio run
<snip>
Looking for dependencies...
Error: Could not find `nanopb-arduino` dependency for `messages` library
If I run pio lib install nanopb-arduino
, then I get the same error for PacketIO
Why are these dependencies not installed automatically?
If it’s worth anything, my root platformio
file contains no lib_deps
, as I assumed these would be found from the nested libraries
PIO installs dependencies only when does it a first time. I mean, when you use pio lib install
pio lib install $what
?
pio lib install messages
doesn’t work, because this isn’t a published library.
Do I have to read the library.json
file by hand, and then do pio lib install
for each dependency?
Perhaps a better question to ask - is putting library.json
files inside local libraries in lib
an intentional feature?
I don’t remember, but I added support to install a library from a local path. See docs
platformio lib [STORAGE_OPTIONS] install file://<folder>
1 Like