{"record":{"id":"6eda390103652b52","repo":"Budibase/budibase","slug":"only-svelte-5-plugins-are-supported-on-this-branch-6eda39","errorCode":null,"errorMessage":"Only Svelte 5 plugins are supported on this branch","messagePattern":"Only Svelte 5 plugins are supported on this branch","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/server/src/sdk/plugins/index.ts","lineNumber":144,"sourceCode":"\nexport async function processUploaded(plugin: KoaFile, source: PluginSource) {\n  const { metadata, directory, cleanupDirectory } = await fileUpload(plugin)\n  try {\n    pluginCore.validate(metadata.schema)\n\n    // Only allow components in cloud\n    if (!env.SELF_HOSTED && metadata.schema?.type !== PluginType.COMPONENT) {\n      throw new Error(\n        \"Only component plugins are supported outside of self-host\"\n      )\n    }\n\n    // Only allow Svelte 5 plugins on this branch\n    if (\n      metadata.schema?.metadata?.svelteMajor !== 5 &&\n      metadata.schema?.type === PluginType.COMPONENT\n    ) {\n      throw new Error(\"Only Svelte 5 plugins are supported on this branch\")\n    }\n\n    const doc = await pro.plugins.storePlugin(metadata, directory, source)\n    clientAppSocket?.emit(\"plugin-update\", { name: doc.name, hash: doc.hash })\n    return doc\n  } finally {\n    deleteFolderFileSystem(cleanupDirectory)\n  }\n}\n\nexport const enrichUsedPluginSvelteMajors = async (\n  usedPlugins?: Plugin[]\n): Promise<Plugin[]> => {\n  if (!usedPlugins?.length) {\n    return []\n  }\n\n  const pluginIds = usedPlugins","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/plugins/index.ts#L126-L162","documentation":"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.","triggerScenarios":"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.","commonSituations":"Plugin authors migrating older Svelte 4 plugins forward; plugins built before the Svelte 5 migration that lack the svelteMajor metadata field in schema.json.","solutions":["Migrate the plugin to Svelte 5 and declare \"svelteMajor\": 5 in schema.json metadata.","If the metadata is missing entirely, update the plugin build tooling (@budibase/builder plugin toolchain) so svelteMajor is emitted.","Verify the built/bundled plugin actually ships the updated schema.json.","Test locally by re-uploading after the schema change."],"exampleFix":"// before (schema.json)\n{ \"type\": \"component\", \"metadata\": { \"name\": \"x\" } }\n// after\n{ \"type\": \"component\", \"metadata\": { \"name\": \"x\", \"svelteMajor\": 5 } }","handlingStrategy":"validation","validationCode":"const major = plugin.metadata?.schema?.metadata?.svelteMajor\nif (plugin.metadata?.schema?.type === \"component\" && major !== 5) {\n  throw new Error(`Component plugin must declare svelteMajor: 5, got ${major}`)\n}","typeGuard":"const isSvelte5 = (m: PluginMetadata): boolean => m.schema?.metadata?.svelteMajor === 5","tryCatchPattern":null,"preventionTips":["Always declare \"svelteMajor\": 5 in schema.json metadata for component plugins","Build plugins with the current @budibase plugin toolchain","Re-upload plugins after the Svelte 5 migration","Verify the packaged schema.json, not just the source one"],"tags":["plugins","svelte","version-compatibility"],"backgroundTag":"plugin-svelte-version-incompatible","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}