moeru-ai/airi · error · Error
Extension entrypoint is required for runtime `${runtime}`. D
Error message
Extension entrypoint is required for runtime `${runtime}`. Define one of `entrypoints.<runtime>`, `entrypoints.default`, or `entrypoints.electron` in the extension manifest. What it means
Thrown by FileSystemLoader.resolveEntrypointFor() when none of entrypoints[runtime], entrypoints.default, or entrypoints.electron (legacy fallback) are defined on the extension manifest. The loader cannot determine which file to import for the requested runtime.
Source
Thrown at packages/plugin-sdk/src/plugin-host/runtimes/node/loaders/fs.ts:62
export class FileSystemLoader {
/**
* Resolve a manifest entrypoint for the requested runtime.
*
* Resolution order:
* 1) `entrypoints.<runtime>`
* 2) `entrypoints.default`
* 3) `entrypoints.electron` (legacy fallback for current local extension manifests)
*/
resolveEntrypointFor(manifest: ExtensionManifestV1, options?: ExtensionLoadOptions) {
const runtime = options?.runtime ?? 'electron'
const root = options?.cwd ?? cwd()
const entrypoint
= manifest.entrypoints[runtime]
?? manifest.entrypoints.default
?? manifest.entrypoints.electron
if (!entrypoint) {
throw new Error(''
+ `Extension entrypoint is required for runtime \`${runtime}\`. `
+ 'Define one of `entrypoints.<runtime>`, `entrypoints.default`, '
+ 'or `entrypoints.electron` in the extension manifest.',
)
}
return isAbsolute(entrypoint) ? entrypoint : join(root, entrypoint)
}
async loadExtensionFor(manifest: ExtensionManifestV1, options?: ExtensionLoadOptions) {
const entrypoint = this.resolveEntrypointFor(manifest, options)
const extensionModule = await import(entrypoint)
return coerceExtensionFromModule(extensionModule)
}
}
View on GitHub (pinned to 27111382b4)
Solutions
- Add `entrypoints.default` to the manifest pointing at a runtime-agnostic entry, so all runtimes fall back to it.
- Or add a runtime-specific entry: `entrypoints.electron`, `entrypoints.node`, or `entrypoints.web` matching the host/session runtime.
- Ensure the runtime passed to host.start matches a key present in entrypoints, or set entrypoints.default as a catch-all.
Example fix
// before — manifest has no entrypoint for electron (the default runtime)
{ "apiVersion": "v1", "kind": "manifest.extension.airi.moeru.ai", "id": "my-ext",
"permissions": {}, "entrypoints": { "web": "./web.js" } }
// after — add default fallback
{ "apiVersion": "v1", "kind": "manifest.extension.airi.moeru.ai", "id": "my-ext",
"permissions": {}, "entrypoints": { "default": "./index.js", "web": "./web.js" } } Defensive patterns
Strategy: validation
Validate before calling
const runtime = options?.runtime ?? 'electron'
const entrypoint = manifest.entrypoints[runtime]
?? manifest.entrypoints.default
?? manifest.entrypoints.electron
if (!entrypoint) {
throw new Error(`No entrypoint for runtime '${runtime}'. Add entrypoints.default or entrypoints.${runtime}.`)
} Type guard
function manifestHasEntryForRuntime(manifest: ExtensionManifestV1, runtime: string): boolean {
return Boolean(manifest.entrypoints[runtime as keyof typeof manifest.entrypoints]
?? manifest.entrypoints.default
?? manifest.entrypoints.electron)
} Try / catch
try {
await host.start(manifest, { runtime })
} catch (error) {
if (error instanceof Error && /Extension entrypoint is required for runtime/.test(error.message)) {
// add entrypoints.default or entrypoints.<runtime> to the manifest, then retry
} else {
throw error
}
} Prevention
- Always set entrypoints.default as a catch-all so any runtime can resolve the entrypoint.
- Ensure the runtime passed to host.start has a matching key in entrypoints.
- Validate the manifest's entrypoints object is non-empty before starting.
When it happens
Trigger: Calling host.start(manifest, { runtime }) or loadExtensionFor(manifest, { runtime }) where the manifest's `entrypoints` object has no key for the requested runtime, no `default`, and no `electron` fallback. The runtime defaults to 'electron' when omitted.
Common situations: Manifest declares only a web or node entrypoint but the host/session runtime is 'electron' (the default). Manifest's entrypoints object is empty or missing. A typo in the runtime key (e.g. 'nodejs' instead of 'node'). Copying a manifest template that omits entrypoints.
Related errors
- Failed to resolve extension module. The entrypoint must expo
- Invalid remote debug port: ${env.APP_REMOTE_DEBUG_PORT}
- No reachable private LAN address is available for the curren
- Failed to apply server channel configuration
- GODOT4 points to a missing Godot executable.\nConfigured pat
AI-assisted analysis of moeru-ai/airi@27111382b4 (2026-08-12).
Data as JSON: /api/errors/f26c91fc1563c721.
Report an issue: GitHub.