{"record":{"id":"72b438a715f89df8","repo":"Budibase/budibase","slug":"only-component-plugins-are-supported-outside-of-se-72b438","errorCode":null,"errorMessage":"Only component plugins are supported outside of self-host","messagePattern":"Only component plugins are supported outside of self-host","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/server/src/sdk/plugins/index.ts","lineNumber":134,"sourceCode":"          plugin?.name,\n          err instanceof Error ? err.message : String(err)\n        )\n      }\n    }\n    if (updated > 0) {\n      console.log(`Backfilled GitHub origin for ${updated} plugin(s).`)\n    }\n  })\n}\n\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  }","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/plugins/index.ts#L116-L152","documentation":"When processing an uploaded plugin, non-self-host (cloud) deployments only accept component-type plugins. processUploaded validates the plugin's schema type and throws this error if a non-component plugin (e.g. datasource, automation) is uploaded outside self-host.","triggerScenarios":"Uploading or watching a plugin whose metadata.schema.type is DATASOURCE, AUTOMATION-BLOCK, etc. while env.SELF_HOSTED is false - e.g. POST to the plugin upload endpoint or plugin file watch on a cloud install.","commonSituations":"A plugin developer tests a datasource plugin against a cloud-hosted Budibase instance; a self-host plugin bundle is uploaded to Budibase Cloud where only component plugins are licensed.","solutions":["Host the plugin on a self-hosted Budibase installation instead of cloud.","Change the plugin's schema type to COMPONENT if it is actually a component plugin.","Check the plugin's schema.json / bundled metadata to confirm the declared type is correct.","Verify env.SELF_HOSTED is set correctly for your deployment type."],"exampleFix":"// before (schema.json)\n{ \"type\": \"datasource\", ... }\n// after\n{ \"type\": \"component\", ... }","handlingStrategy":"validation","validationCode":"if (!env.SELF_HOSTED && plugin.metadata?.schema?.type !== \"component\") {\n  throw new Error(\"Upload non-component plugins only on self-host installs\")\n}","typeGuard":"const isComponentPlugin = (m: PluginMetadata): boolean => m.schema?.type === PluginType.COMPONENT","tryCatchPattern":null,"preventionTips":["Read the plugin's schema.json type before uploading","Only test datasource/automation plugins on self-hosted instances","Verify env.SELF_HOSTED matches your deployment target","Keep separate plugin sets for cloud vs self-host"],"tags":["plugins","upload","cloud"],"backgroundTag":"plugin-type-not-supported","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}