halo-dev/halo · error · IllegalArgumentException
Provider manifest format must be esm
Error message
Provider manifest format must be esm
What it means
Error "Provider manifest format must be esm" thrown in halo-dev/halo.
Source
Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:226
}
}
private ProviderManifest readManifest(ProviderCandidate candidate, Resource resource) throws IOException {
JsonNode manifest;
try (var inputStream = resource.getInputStream()) {
manifest = JSON_MAPPER.readTree(inputStream);
}
if (!manifest.isObject()) {
throw new IllegalArgumentException("Provider manifest must be an object");
}
var fields = new HashSet<String>();
fields.addAll(manifest.propertyNames());
if (!fields.containsAll(Set.of("format", "entry"))
|| !Set.of("format", "entry", "style").containsAll(fields)) {
throw new IllegalArgumentException("Provider manifest must contain format, entry, and optional style only");
}
if (!"esm".equals(manifest.path("format").textValue())) {
throw new IllegalArgumentException("Provider manifest format must be esm");
}
var entry = validateManifestResource(candidate, manifest.path("entry"));
var style = manifest.has("style") ? validateManifestResource(candidate, manifest.path("style")) : null;
return new ProviderManifest(entry, style);
}
private String validateManifestResource(ProviderCandidate candidate, JsonNode value) {
if (!value.isTextual()) {
throw new IllegalArgumentException("Provider resource path must be a string");
}
var resourcePath = normalizeResourcePath(value.textValue());
var resource = providerResource(candidate, resourcePath);
if (resource == null || !resource.isReadable()) {
throw new IllegalArgumentException(
"Provider resource does not exist inside its root: " + value.textValue());
}
return resourcePath;
}View on GitHub (pinned to d2f5165f9c)
Solutions
- Set the provider manifest 'format' field to "esm"; other module formats are not accepted here.
- Rebuild the UI plugin with ESM output enabled in the bundler configuration.
- If the plugin targets an older Halo, use an older bundler that emits the format supported by that Halo version.
When it happens
Trigger: Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:226 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of halo-dev/halo@d2f5165f9c (2026-08-14).
Data as JSON: /api/errors/fbc61a7c9c0f12fa.
Report an issue: GitHub.