paperclipai/paperclip · error

Worker entrypoint not found for plugin "${plugin.pluginKey}"

Error message

Worker entrypoint not found for plugin "${plugin.pluginKey}". Checked: ${path.resolve(packageDir, workerRelPath)}, ${path.resolve(directDir, workerRelPath)}

What it means

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.

Source

Thrown at server/src/services/plugin-loader.ts:2557

    const entrypoint = path.resolve(dir, workerRelPath);

    // Security: ensure entrypoint is actually inside the directory (prevent path traversal)
    if (!entrypoint.startsWith(path.resolve(dir))) {
      continue;
    }

    if (existsSync(entrypoint)) {
      return entrypoint;
    }
  }

  // Fallback: try the worker path as-is (absolute or relative to cwd)
  // ONLY if it's already an absolute path and we trust the manifest (which we've already validated)
  if (path.isAbsolute(workerRelPath) && existsSync(workerRelPath)) {
    return workerRelPath;
  }

  throw new Error(
    `Worker entrypoint not found for plugin "${plugin.pluginKey}". ` +
      `Checked: ${path.resolve(packageDir, workerRelPath)}, ` +
      `${path.resolve(directDir, workerRelPath)}`,
  );
}

function resolvePluginPackageRoot(
  plugin: PluginRecord & { packagePath?: string | null },
  localPluginDir: string,
): string {
  if (plugin.packagePath && existsSync(plugin.packagePath)) {
    return path.resolve(plugin.packagePath);
  }

  const packageName = plugin.packageName;
  const packageDir = packageName.startsWith("@")
    ? path.join(localPluginDir, "node_modules", ...packageName.split("/"))
    : path.join(localPluginDir, "node_modules", packageName);

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Build the plugin so the worker entrypoint exists at one of the checked paths, or fix the worker path in the manifest/package layout.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/plugin-loader.ts:2557 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/4e46c4e962ad984b. Report an issue: GitHub.