Budibase/budibase · error

Only Svelte 5 plugins are supported on this branch

Error message

Only Svelte 5 plugins are supported on this branch

What it means

This branch of Budibase only supports component plugins built with Svelte 5. processUploaded inspects metadata.schema.metadata.svelteMajor and rejects component plugins not declared as Svelte 5.

Source

Thrown at packages/server/src/sdk/plugins/index.ts:144

export async function processUploaded(plugin: KoaFile, source: PluginSource) {
  const { metadata, directory, cleanupDirectory } = await fileUpload(plugin)
  try {
    pluginCore.validate(metadata.schema)

    // Only allow components in cloud
    if (!env.SELF_HOSTED && metadata.schema?.type !== PluginType.COMPONENT) {
      throw new Error(
        "Only component plugins are supported outside of self-host"
      )
    }

    // Only allow Svelte 5 plugins on this branch
    if (
      metadata.schema?.metadata?.svelteMajor !== 5 &&
      metadata.schema?.type === PluginType.COMPONENT
    ) {
      throw new Error("Only Svelte 5 plugins are supported on this branch")
    }

    const doc = await pro.plugins.storePlugin(metadata, directory, source)
    clientAppSocket?.emit("plugin-update", { name: doc.name, hash: doc.hash })
    return doc
  } finally {
    deleteFolderFileSystem(cleanupDirectory)
  }
}

export const enrichUsedPluginSvelteMajors = async (
  usedPlugins?: Plugin[]
): Promise<Plugin[]> => {
  if (!usedPlugins?.length) {
    return []
  }

  const pluginIds = usedPlugins

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Migrate the plugin to Svelte 5 and declare "svelteMajor": 5 in schema.json metadata.
  2. If the metadata is missing entirely, update the plugin build tooling (@budibase/builder plugin toolchain) so svelteMajor is emitted.
  3. Verify the built/bundled plugin actually ships the updated schema.json.
  4. Test locally by re-uploading after the schema change.

Example fix

// before (schema.json)
{ "type": "component", "metadata": { "name": "x" } }
// after
{ "type": "component", "metadata": { "name": "x", "svelteMajor": 5 } }
Defensive patterns

Strategy: validation

Validate before calling

const major = plugin.metadata?.schema?.metadata?.svelteMajor
if (plugin.metadata?.schema?.type === "component" && major !== 5) {
  throw new Error(`Component plugin must declare svelteMajor: 5, got ${major}`)
}

Type guard

const isSvelte5 = (m: PluginMetadata): boolean => m.schema?.metadata?.svelteMajor === 5

Prevention

When it happens

Trigger: Uploading a component plugin whose metadata.schema.metadata.svelteMajor is missing or not 5 (i.e. a Svelte 4 or untagged plugin) while its schema type is COMPONENT.

Common situations: Plugin authors migrating older Svelte 4 plugins forward; plugins built before the Svelte 5 migration that lack the svelteMajor metadata field in schema.json.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/6eda390103652b52. Report an issue: GitHub.