{"record":{"id":"4e46c4e962ad984b","repo":"paperclipai/paperclip","slug":"worker-entrypoint-not-found-for-plugin-plugin-p","errorCode":null,"errorMessage":"Worker entrypoint not found for plugin \"${plugin.pluginKey}\". Checked: ${path.resolve(packageDir, workerRelPath)}, ${path.resolve(directDir, workerRelPath)}","messagePattern":"Worker entrypoint not found for plugin \"(.+?)\"\\. Checked: (.+?), (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-loader.ts","lineNumber":2557,"sourceCode":"    const entrypoint = path.resolve(dir, workerRelPath);\n\n    // Security: ensure entrypoint is actually inside the directory (prevent path traversal)\n    if (!entrypoint.startsWith(path.resolve(dir))) {\n      continue;\n    }\n\n    if (existsSync(entrypoint)) {\n      return entrypoint;\n    }\n  }\n\n  // Fallback: try the worker path as-is (absolute or relative to cwd)\n  // ONLY if it's already an absolute path and we trust the manifest (which we've already validated)\n  if (path.isAbsolute(workerRelPath) && existsSync(workerRelPath)) {\n    return workerRelPath;\n  }\n\n  throw new Error(\n    `Worker entrypoint not found for plugin \"${plugin.pluginKey}\". ` +\n      `Checked: ${path.resolve(packageDir, workerRelPath)}, ` +\n      `${path.resolve(directDir, workerRelPath)}`,\n  );\n}\n\nfunction resolvePluginPackageRoot(\n  plugin: PluginRecord & { packagePath?: string | null },\n  localPluginDir: string,\n): string {\n  if (plugin.packagePath && existsSync(plugin.packagePath)) {\n    return path.resolve(plugin.packagePath);\n  }\n\n  const packageName = plugin.packageName;\n  const packageDir = packageName.startsWith(\"@\")\n    ? path.join(localPluginDir, \"node_modules\", ...packageName.split(\"/\"))\n    : path.join(localPluginDir, \"node_modules\", packageName);","sourceCodeStart":2539,"sourceCodeEnd":2575,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/plugin-loader.ts#L2539-L2575","documentation":"Entrypoint resolution failure: the manifest's worker path was checked under the package dir and direct dir (with path-traversal protection) and existsSync failed for each candidate, and it is not an absolute existing path either. The plugin's missing/misdeclared worker entrypoint is at fault.","triggerScenarios":"Thrown at server/src/services/plugin-loader.ts:2557 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Build the plugin so the worker entrypoint exists at one of the checked paths, or fix the worker path in the manifest/package layout."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}