moeru-ai/airi · error · Error

Extension \` \` does not support runtime \` \`.

Error message

Extension \`${manifest.id}\` does not support runtime \`${runtime}\`.

What it means

The node/fs loader's resolveEntrypointFor picks a runtime (options?.runtime ?? 'electron', defaulting to electron) and requires the manifest to declare it in engines.runtimes before resolving an entrypoint path. If the runtime is absent from the list, resolution is rejected — the same compatibility rule as the plugin host, applied at load time.

Solutions

  1. Add the target runtime to manifest.engines.runtimes.
  2. Pass options.runtime explicitly to resolveEntrypointFor to match a declared runtime.
  3. Fix typos in the runtimes array so it matches the PluginRuntime union.
  4. Load a manifest variant built for the intended runtime.

Example fix

// before
resolveEntrypointFor(manifest) // defaults to 'electron'; manifest lists only ['node']
// after
resolveEntrypointFor(manifest, { runtime: 'node' })
Defensive patterns

Strategy: validation

Validate before calling

const runtime = options?.runtime ?? 'electron'
if (!manifest.engines.runtimes.includes(runtime))
  return null // skip extension instead of loading

Try / catch

try {
  const entry = await loader.resolveEntrypointFor(manifest, { runtime: 'node' })
} catch (e) {
  if (e.message.includes('does not support runtime')) continueToNextExtension()
  else throw e
}

Prevention

When it happens

Trigger: Calling resolveEntrypointFor(manifest, options) where manifest.engines.runtimes excludes options.runtime (or the default 'electron').

Common situations: Loading an extension built for 'node' with the default electron runtime; omitting options and the manifest only lists non-electron runtimes; runtime string typos in the manifest.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of moeru-ai/airi@438a067dde (2026-09-17). Data as JSON: /api/errors/7bd6fa2ec001a55e. Report an issue: GitHub.

Appendix: source

Thrown at packages/plugin-sdk/src/plugin-host/runtimes/node/loaders/fs.ts:55

 *
 * Expects:
 * - Entry points are valid importable module paths for the active runtime
 *
 * Returns:
 * - Filesystem-backed helpers for resolving and loading extension entrypoints
 */
export class FileSystemLoader {
  /**
   * Resolve a manifest entrypoint for the requested runtime.
   *
   * Resolution order:
   * 1) `entrypoints.<runtime>`
   * 2) `entrypoints.default`
   */
  resolveEntrypointFor(manifest: ExtensionManifestV2, options?: ExtensionLoadOptions) {
    const runtime = options?.runtime ?? 'electron'
    if (!manifest.engines.runtimes.includes(runtime)) {
      throw new Error(`Extension \`${manifest.id}\` does not support runtime \`${runtime}\`.`)
    }

    const root = options?.cwd ?? cwd()
    const entrypoint
      = manifest.entrypoints[runtime]
        ?? manifest.entrypoints.default

    if (!entrypoint) {
      throw new Error(''
        + `Extension entrypoint is required for runtime \`${runtime}\`. `
        + 'Define `entrypoints.<runtime>` or `entrypoints.default` in the extension manifest.',
      )
    }

    return isAbsolute(entrypoint) ? entrypoint : join(root, entrypoint)
  }

  async loadExtensionFor(manifest: ExtensionManifestV2, options?: ExtensionLoadOptions) {

View on GitHub (pinned to 438a067dde)