[GH-ISSUE #15981] @ollama/openclaw-web-search: Plugin ships only TypeScript source, no compiled JavaScript #87864

Open
opened 2026-05-10 06:28:02 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @erforschtbot-cmyk on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15981

Originally assigned to: @BruceMacD on GitHub.

Problem

The npm package @ollama/openclaw-web-search (v0.2.2, latest) only ships index.ts (TypeScript source) but no compiled JavaScript entry point. OpenClaw's plugin loader cannot load TypeScript directly — it looks for one of:

./dist/index.js
./dist/index.mjs
./dist/index.cjs
index.js
index.mjs
index.cjs

None of these exist. This causes the plugin to fail to load entirely, logged as:

plugin openclaw-web-search: installed plugin package requires compiled runtime output for TypeScript entry index.ts
plugin not found: openclaw-web-search (stale config entry ignored)

Root Cause

  • package.json declares "main": "index.ts" but only includes index.ts in the "files" array, with no compiled JavaScript artifact.
  • There is no prepublishOnly, build, or postinstall script to compile the TypeScript to JavaScript.

Expected Behavior

The npm package should include a compiled JavaScript entry point (e.g., index.js or dist/index.js) so that OpenClaw can load the plugin without requiring a manual build step.

Workaround

Users can manually compile with esbuild:

cd ~/.openclaw/extensions/openclaw-web-search && npx esbuild index.ts --bundle --format=esm --platform=node --outfile=index.js

But this is wiped on every update/reinstall.

Suggested Fix

Either:

  1. Add a prepublishOnly / build script in package.json that compiles index.tsindex.js (or dist/index.js)
  2. Or ship the compiled JavaScript directly in the npm package

Environment

  • @ollama/openclaw-web-search v0.2.2
  • OpenClaw v2026.5.4
  • Node.js v25.9.0
Originally created by @erforschtbot-cmyk on GitHub (May 5, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15981 Originally assigned to: @BruceMacD on GitHub. ## Problem The npm package `@ollama/openclaw-web-search` (v0.2.2, latest) only ships `index.ts` (TypeScript source) but no compiled JavaScript entry point. OpenClaw's plugin loader cannot load TypeScript directly — it looks for one of: ``` ./dist/index.js ./dist/index.mjs ./dist/index.cjs index.js index.mjs index.cjs ``` None of these exist. This causes the plugin to fail to load entirely, logged as: ``` plugin openclaw-web-search: installed plugin package requires compiled runtime output for TypeScript entry index.ts plugin not found: openclaw-web-search (stale config entry ignored) ``` ## Root Cause - `package.json` declares `"main": "index.ts"` but only includes `index.ts` in the `"files"` array, with no compiled JavaScript artifact. - There is no `prepublishOnly`, `build`, or `postinstall` script to compile the TypeScript to JavaScript. ## Expected Behavior The npm package should include a compiled JavaScript entry point (e.g., `index.js` or `dist/index.js`) so that OpenClaw can load the plugin without requiring a manual build step. ## Workaround Users can manually compile with esbuild: ``` cd ~/.openclaw/extensions/openclaw-web-search && npx esbuild index.ts --bundle --format=esm --platform=node --outfile=index.js ``` But this is wiped on every update/reinstall. ## Suggested Fix Either: 1. Add a `prepublishOnly` / `build` script in `package.json` that compiles `index.ts` → `index.js` (or `dist/index.js`) 2. Or ship the compiled JavaScript directly in the npm package ## Environment - `@ollama/openclaw-web-search` v0.2.2 - OpenClaw v2026.5.4 - Node.js v25.9.0
Author
Owner

@zzyu17 commented on GitHub (May 8, 2026):

+1, tried manually compilation, but failed.

<!-- gh-comment-id:4407187807 --> @zzyu17 commented on GitHub (May 8, 2026): +1, tried manually compilation, but failed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#87864