{"record":{"id":"0c0e53552309cabb","repo":"musistudio/claude-code-router","slug":"productname-runtime-module-was-not-found-rebui","errorCode":null,"errorMessage":"${productName} runtime module was not found. Rebuild app assets so the bundled ${productName} plugin is copied into the Electron dist.","messagePattern":"(.+?) runtime module was not found\\. Rebuild app assets so the bundled (.+?) plugin is copied into the Electron dist\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/config/config.ts","lineNumber":2994,"sourceCode":"export function withClaudeDesignRuntimePluginConfig(config: AppConfig): AppConfig {\n  return withClaudeProductRuntimePluginConfig(config, CLAUDE_DESIGN_PLUGIN_ID, \"Claude Design\");\n}\n\nexport function withClaudeShipRuntimePluginConfig(config: AppConfig): AppConfig {\n  return withClaudeProductRuntimePluginConfig(config, CLAUDE_SHIP_PLUGIN_ID, \"Claude Ship\");\n}\n\nfunction withClaudeProductRuntimePluginConfig(config: AppConfig, pluginId: string, productName: string): AppConfig {\n  const existingIndex = config.plugins.findIndex((plugin) => plugin.enabled !== false && plugin.id === pluginId);\n  if (existingIndex >= 0 && config.plugins[existingIndex]?.module?.trim()) {\n    return config;\n  }\n  if (!isDesktopAppRuntime()) {\n    throw new Error(`${productName} is only available in CCR Desktop.`);\n  }\n  const plugin = claudeProductRuntimePluginConfig(pluginId);\n  if (!plugin) {\n    throw new Error(`${productName} runtime module was not found. Rebuild app assets so the bundled ${productName} plugin is copied into the Electron dist.`);\n  }\n  if (existingIndex >= 0) {\n    const existing = config.plugins[existingIndex];\n    const plugins = [...config.plugins];\n    plugins[existingIndex] = {\n      ...plugin,\n      ...existing,\n      apps: existing.apps ?? plugin.apps,\n      module: plugin.module,\n      permissions: existing.permissions ?? plugin.permissions,\n      surfaces: existing.surfaces ?? plugin.surfaces\n    };\n    return {\n      ...config,\n      plugins\n    };\n  }\n  return {","sourceCodeStart":2976,"sourceCodeEnd":3012,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/config/config.ts#L2976-L3012","documentation":"Thrown by the desktop config writer when the bundled ${productName} (CCR) runtime plugin config cannot be resolved via claudeProductRuntimePluginConfig(pluginId). It means the app is running in the CCR Desktop (Electron) runtime, but the plugin module that should ship inside the Electron dist assets is missing, typically because app assets were built without copying the bundled plugin.","triggerScenarios":"Calling the config API that installs/updates the ${productName} runtime plugin (isDesktopAppRuntime() returns true) after isDesktopAppRuntime check passes, but claudeProductRuntimePluginConfig(pluginId) returns undefined because the plugin was never copied into the Electron dist.","commonSituations":"Running a dev build of the Electron app without rebuilding assets; CI builds that skip the asset-copy step; upgrading CCR Desktop where the dist layout changed and the plugin is no longer bundled; stale node_modules/electron dist after a version bump.","solutions":["Rebuild the app assets (the build step that copies the bundled CCR plugin into the Electron dist) and restart the app","Clear stale build output (dist/, out/, electron build cache) and rebuild from clean","Reinstall/upgrade CCR Desktop so the plugin ships with the matching version","If developing locally, verify the plugin id exists in the bundled plugin manifest used by claudeProductRuntimePluginConfig"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if (isDesktopAppRuntime() && !claudeProductRuntimePluginConfig(pluginId)) { /* rebuild assets before proceeding */ }","typeGuard":"const hasRuntimePlugin = (id: string) =>\n  isDesktopAppRuntime() && claudeProductRuntimePluginConfig(id) !== undefined;","tryCatchPattern":"try { applyPlugin(config, pluginId); } catch (e) { if (e instanceof Error && /runtime module was not found/.test(e.message)) { await rebuildAssets(); } else throw e; }","preventionTips":["Add an asset-build verification step to CI that asserts the plugin exists in the Electron dist","Run the app from a script that always rebuilds assets first"],"tags":["electron","desktop","plugin","build-assets","runtime"],"backgroundTag":"missing-bundled-plugin","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}