'h5p utils pack' fails with “no valid libraries found; use ‘‑f’ to skip validation” – what am I missing?
I’m developing a custom H5P question type. My goal was to extend the existing H5P.Blanks
question type and add Syntax Highlighting throught a thrid party packages from npm.
I am have problems packaging the library with the cli command h5p utils pack.
I am getting a validation error, but I have no clue what is wrong with my library. I am guessing it could be something about having a build process that gets in the way of the command, but since all dependencies are listed in the library.json why would this be a problem? Other than that the library works fine, in the h5p-cli enviroment and when importet to Lumi H5P Desktop Editor.
The command I ran:
my_first_h5p_environment/libraries % h5p utils pack -r H5P.SyntaxBlanks syn.h5p
no valid libraries found; use '-f' to skip validation
Does anyone have a guess what could be wrong or what I am foolishly overlooking?
I already compared my implementation to other libraries and can't find a reason for this error.
My Code can be found here:
https://github.com/mohammed7700/bachelor-h5p-questiontypes/tree/main/H5P...
Any hint would be hugely appreciated. I’ve been been trying to find the root cause for quite a time now and feel I’m missing something obvious.
ddean
Sat, 05/10/2025 - 12:56
Permalink
For Anyone that also
For Anyone that also encounters this issue.
After looking at the Code of the the pack command, the solution to my problem was that the Library folder you want to pack is a git repository.
otacke
Sat, 05/10/2025 - 12:56
Permalink
The validator of the H5P CLI
The validator of the H5P CLI tool (for whatever reason) only works on git repositories. The validator checks for the existence of `.git/config`. Since you do not use separate repositories for your content types but merely use them as directories inside a repository, this fails.
Change to `H5P.SyntaxBlanks` and run `git init` or `mkdir .git && touch .git/config` before using H5P tool's pack command.