Budibase/budibase · error · 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 for Svelte 5. Component plugins declaring svelteMajor other than 5 (or omitting it, defaulting to 4) in their schema.json metadata are rejected at install time.

Source

Thrown at packages/server/src/api/controllers/plugin/index.ts:124

      }
      default:
        ctx.throw(400, "Invalid source")
    }

    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"
      )
    }

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

    let origin
    if (source === PluginSource.GITHUB) {
      const { repo, url: canonical } = sdk.plugins.parseGithubRepo(url)
      if (repo && canonical) {
        origin = { source: "github" as const, repo, url: canonical }
      }
    }

    const doc = await pro.plugins.storePlugin(
      metadata,
      directory!,
      source,
      origin
    )

    clientAppSocket?.emit("plugins-update", { name, hash: doc.hash })

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Update the plugin to Svelte 5 and set metadata.svelteMajor: 5 in schema.json
  2. Rebuild and republish the plugin tarball after migration
  3. Use a Budibase release/branch that supports Svelte 4 plugins
  4. Check the plugin repo for a Svelte 5 migration branch

Example fix

// schema.json
// before
"metadata": { "type": "component", "version": 1 }
// after
"metadata": { "type": "component", "version": 1, "svelteMajor": 5 }
Defensive patterns

Strategy: validation

Validate before calling

const schema = JSON.parse(await fs.readFile('schema.json', 'utf8'))
if (schema.type === 'component' && schema.metadata?.svelteMajor !== 5) {
  throw new Error('Component plugin must declare svelteMajor: 5')
}

Type guard

function isSvelte5Component(schema: { type?: string; metadata?: { svelteMajor?: number } }): boolean {
  return schema.type === 'component' && schema.metadata?.svelteMajor === 5
}

Try / catch

try {
  await installPlugin({ source: 'NPM', url })
} catch (err) {
  if (err.message === 'Only Svelte 5 plugins are supported on this branch') {
    console.error('Migrate the plugin to Svelte 5 and set svelteMajor: 5 in schema.json')
  }
}

Prevention

When it happens

Trigger: Installing a component plugin whose schema.json has metadata.svelteMajor set to 4 (or absent) while type is component.

Common situations: Using a legacy plugin written for Budibase's Svelte 4 era; plugin boilerplate not yet migrated; forgetting to bump svelteMajor in schema.json after porting the component code.

Related errors


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