H5P "Missing required library": causes and fixes
H5P shows "Missing required library" when the package or the target platform cannot supply a library that the activity declares as a dependency. The error usually includes a machine name and version, such as H5P.MultiChoice 1.16 or H5PEditor.CoursePresentation 1.26. Save that exact text before changing anything.
The missing name tells you which layer failed: package contents, installed platform libraries, upload permission or H5P core compatibility.
What an H5P package is expected to contain
An H5P content package is a ZIP archive with a defined structure and the .h5p extension. The root h5p.json identifies the main content library and lists preloadedDependencies. The content/content.json file holds the activity parameters. Library directories provide the JavaScript, CSS, translations and metadata needed to run or edit the activity.
The official H5P package definition requires each dependency entry to name its machineName, majorVersion and minorVersion. A declared dependency such as H5P.MultiChoice 1.16 must either be included in the archive or already be installed with that major and minor version on the destination platform.
Cause 1: the package is incomplete
H5P's troubleshooting guide defines "Missing required library" directly: a mandatory library is missing from the package. This can happen when a file was assembled manually, exported by a tool that omits dependencies or copied through a process that removed library folders.
Inspect a copy of the file:
- Rename the copy from
.h5pto.zip. - Open it without modifying the original.
- Read
h5p.jsonand note the main library and every preloaded dependency. - Check for matching folders such as
H5P.MultiChoice-1.16. - Read each library's
library.jsonand repeat the check for its dependencies.
The folder name must match the machine name and major/minor version. A folder named H5P.MultiChoice-1.15 does not satisfy a dependency on H5P.MultiChoice 1.16.
Fix the package at its source. Renaming a library folder changes the label, not the code version, and can create a package that imports but fails at runtime.
Cause 2: the uploader cannot install libraries
H5P libraries contain executable JavaScript, so platforms treat installing them as an administrative action. The H5P security model says that when a user lacks permission to update libraries, bundled libraries may be ignored and the content must rely on compatible libraries already installed on the site.
This creates a common pattern:
- an administrator can import the file;
- a teacher or author receives a missing-library error;
- the same teacher can import it after the administrator installs the content type once.
Ask an administrator to upload the package in a staging area or install the named content type through the platform's H5P library administration. Do not grant broad library-update permission to every author as a quick fix.
Cause 3: the target platform has an older library version
The destination may have H5P.MultiChoice 1.15 while the package requires 1.16. H5P identifies dependencies by major and minor version, so the older installation does not satisfy the declaration.
Update the content type through the platform's supported H5P update process. On Moodle, the exact path depends on whether the site uses Moodle's core H5P activity, the community mod_hvp plugin or H5P.com through LTI. On WordPress or Drupal, update the integration and content libraries through their administration interfaces.
Back up the site before a library update and test existing activities afterward. Updating a shared library can affect content that was created earlier.
Cause 4: H5P core is too old for the library
Each library.json can declare the minimum H5P Core API version it needs. The official library definition documents the coreApi property. A current activity library may not install on an old H5P plugin or module even when its folder is present in the package.
H5P may report this separately as API version unsupported. Some platform interfaces surface the dependency failure first, so check both the application log and the visible upload message.
Update the H5P integration before forcing newer library folders into an old installation. Copying files manually can bypass one validator message and leave incompatible JavaScript behind.
Cause 5: the archive structure or metadata is wrong
A malformed archive can make a present library look absent. Check for:
- an extra parent directory around
h5p.json; - a missing or invalid
h5p.json; - a library directory whose name does not match
library.json; - incorrect
machineName,majorVersionorminorVersionvalues; - files blocked by H5P's allowed-extension list;
- a corrupt ZIP renamed to
.h5p.
These conditions may produce different validator messages, including "Invalid h5p.json file", "Library directory name mismatch" or "Missing library dependency". Record all messages, not only the first one displayed.
A focused diagnosis
Use the exact missing name to follow one path:
| Check | If yes | If no |
|---|---|---|
| Does the archive contain the named library and version? | Check metadata and platform permission | Re-export a complete package |
| Can an administrator import the same file? | Install the library centrally or review author permissions | Continue to compatibility checks |
| Is the required major and minor library version installed? | Check folder metadata and transitive dependencies | Update or install the content type |
| Does the library require a newer H5P Core API? | Update the H5P integration | Inspect package validation logs |
| Does the file import on another current H5P installation? | Target-platform issue | Package-generation issue |
Change one variable per test. Trying a different user, then a current staging site, provides more evidence than repeatedly downloading the same file.
How LMSable packages H5P dependencies
The LMSable H5P Generator resolves the main library, nested content libraries and their preloaded dependencies before export. It also includes available editor and dynamic libraries in the archive, while keeping only runtime dependencies in h5p.json.
This allows a destination with library-install permission to install the bundled dependencies instead of requiring those versions in advance. It cannot bypass a platform policy that blocks library installation, and it cannot make a new library compatible with an older H5P Core API. The same packaging step runs at the end of the workflow to create H5P content with ChatGPT without an API key.
If an LMSable file still fails, send the administrator four items:
- The complete error text with library name and version.
- The target platform and H5P integration version.
- The role used for the upload.
- Whether the same file imports under an administrator account or on another current H5P site.
Those details distinguish a package defect from a target-platform restriction.
Create a new .h5p file with its dependency libraries included, then test the download on a staging copy of the destination platform before replacing live content.