Bug: npm package ships TypeScript source only — no compiled output (dist/)
Description
The @memtensor/memos-local-openclaw-plugin npm package (both 1.0.8 and 1.0.10) publishes only TypeScript source code without compiled JavaScript output. This causes the plugin to fail loading in OpenClaw 2026.5.4, which expects compiled JS (dist/index.js, dist/index.mjs, or dist/index.cjs).
Steps to Reproduce
- Run the official install script:
curl -fsSL https://cdn.memtensor.com.cn/memos-local-openclaw/install.sh | bash
- The install completes but the plugin fails to load with:
plugins.slots.memory: plugin not found: memos-local-openclaw-plugin
- OpenClaw reports:
installed plugin package requires compiled runtime output for TypeScript entry index.ts: expected ./dist/index.js, ./dist/index.mjs, ./dist/index.cjs, index.js, index.mjs, index.cjs
Root Cause
package.json has "main": "index.ts" (pointing to raw TypeScript)
prepublishOnly script is: echo 'Source-only publish — no build needed.'
- No
dist/ directory exists in the published package
- No
tsconfig.json is included
The package was designed assuming the runtime would handle TypeScript directly, but OpenClaw's plugin loader requires compiled JS.
Environment
- OpenClaw: 2026.5.4 (stable)
- OS: macOS 26.3.1 (arm64)
- Node.js: v22.18.0
- Plugin version: 1.0.10 (also confirmed on 1.0.8)
Workaround
Manually compile the plugin after install:
cd ~/.openclaw/extensions/memos-local-openclaw-plugin
# Create tsconfig.json
cat > tsconfig.json << 'TSEOF'
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"outDir": "./dist",
"rootDir": ".",
"declaration": false,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": false,
"noEmit": false
},
"include": ["index.ts", "src/**/*.ts"],
"exclude": ["node_modules", "dist", "scripts", "skill"]
}
TSEOF
# Create type shim for openclaw/plugin-sdk
mkdir -p dist
cat > dist/openclaw-plugin-sdk.d.ts << 'DTEOF'
export interface OpenClawPluginApi {
registerTool(...args: any[]): void;
registerHook(...args: any[]): void;
registerMemoryCapability(...args: any[]): void;
getConfig(): any;
getLogger(): any;
logger: any;
[key: string]: any;
}
DTEOF
# Compile
npx tsc
Then re-register the plugin in ~/.openclaw/openclaw.json.
Suggested Fix
Either:
- Add a
tsconfig.json and include a prepublishOnly build step that compiles to dist/
- Or ship the compiled JS alongside the TypeScript source in the npm package
- Or change
"main" in package.json to point to a compiled entry point
Bug: npm package ships TypeScript source only — no compiled output (dist/)
Description
The
@memtensor/memos-local-openclaw-pluginnpm package (both 1.0.8 and 1.0.10) publishes only TypeScript source code without compiled JavaScript output. This causes the plugin to fail loading in OpenClaw 2026.5.4, which expects compiled JS (dist/index.js,dist/index.mjs, ordist/index.cjs).Steps to Reproduce
curl -fsSL https://cdn.memtensor.com.cn/memos-local-openclaw/install.sh | bashRoot Cause
package.jsonhas"main": "index.ts"(pointing to raw TypeScript)prepublishOnlyscript is:echo 'Source-only publish — no build needed.'dist/directory exists in the published packagetsconfig.jsonis includedThe package was designed assuming the runtime would handle TypeScript directly, but OpenClaw's plugin loader requires compiled JS.
Environment
Workaround
Manually compile the plugin after install:
Then re-register the plugin in
~/.openclaw/openclaw.json.Suggested Fix
Either:
tsconfig.jsonand include aprepublishOnlybuild step that compiles todist/"main"inpackage.jsonto point to a compiled entry point