openclaw - 💡(How to fix) Fix v2026.3.28: dist/docs/reference/templates/ missing + memory-lancedb fails to load [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57372Fetched 2026-04-08 01:50:31
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

After installing v2026.3.28 via npm install -g openclaw, the gateway crashes on startup with two packaging issues:

Error Message

Error: Missing workspace template: AGENTS.md (/usr/lib/node_modules/openclaw/dist/docs/reference/templates/AGENTS.md). Ensure docs/reference/templates are packaged.

Root Cause

Root cause: dist/lancedb-runtime-*.js line ~11:

const lanceDbSpec = JSON.parse(
  fsSync.readFileSync(new URL("./package.json", import.meta.url), "utf8")
).dependencies?.["@lancedb/lancedb"];

Fix Action

Fix / Workaround

Workaround:

sudo mkdir -p /usr/lib/node_modules/openclaw/dist/docs/reference/templates/
sudo cp /usr/lib/node_modules/openclaw/docs/reference/templates/* \
   /usr/lib/node_modules/openclaw/dist/docs/reference/templates/

Workaround:

sudo npm install @lancedb/lancedb@"^0.27.1"
echo '{"dependencies":{"@lancedb/lancedb":"^0.27.1"}}' | sudo tee /usr/lib/node_modules/openclaw/dist/package.json

Code Example

Error: Missing workspace template: AGENTS.md
(/usr/lib/node_modules/openclaw/dist/docs/reference/templates/AGENTS.md).
Ensure docs/reference/templates are packaged.

---

sudo mkdir -p /usr/lib/node_modules/openclaw/dist/docs/reference/templates/
sudo cp /usr/lib/node_modules/openclaw/docs/reference/templates/* \
   /usr/lib/node_modules/openclaw/dist/docs/reference/templates/

---

memory-lancedb package.json is missing "@lancedb/lancedb"
(plugin=memory-lancedb, source=dist/extensions/memory-lancedb/index.js)

---

const lanceDbSpec = JSON.parse(
  fsSync.readFileSync(new URL("./package.json", import.meta.url), "utf8")
).dependencies?.["@lancedb/lancedb"];

---

sudo npm install @lancedb/lancedb@"^0.27.1"
echo '{"dependencies":{"@lancedb/lancedb":"^0.27.1"}}' | sudo tee /usr/lib/node_modules/openclaw/dist/package.json
RAW_BUFFERClick to expand / collapse

Description

After installing v2026.3.28 via npm install -g openclaw, the gateway crashes on startup with two packaging issues:

1. Missing workspace templates in dist/

The entire dist/docs/reference/templates/ directory is missing from the published package. Templates exist in docs/reference/templates/ but are not copied/included in dist/.

Error:

Error: Missing workspace template: AGENTS.md
(/usr/lib/node_modules/openclaw/dist/docs/reference/templates/AGENTS.md).
Ensure docs/reference/templates are packaged.

Workaround:

sudo mkdir -p /usr/lib/node_modules/openclaw/dist/docs/reference/templates/
sudo cp /usr/lib/node_modules/openclaw/docs/reference/templates/* \
   /usr/lib/node_modules/openclaw/dist/docs/reference/templates/

2. memory-lancedb plugin fails: @lancedb/lancedb not found

The lancedb-runtime module (bundled in dist/lancedb-runtime-*.js) reads @lancedb/lancedb from dist/package.json via import.meta.url, but no package.json exists in dist/. The main package.json doesn't declare @lancedb/lancedb as a dependency either — it's only in the plugin's own dist/extensions/memory-lancedb/package.json.

Error:

memory-lancedb package.json is missing "@lancedb/lancedb"
(plugin=memory-lancedb, source=dist/extensions/memory-lancedb/index.js)

Root cause: dist/lancedb-runtime-*.js line ~11:

const lanceDbSpec = JSON.parse(
  fsSync.readFileSync(new URL("./package.json", import.meta.url), "utf8")
).dependencies?.["@lancedb/lancedb"];

import.meta.url resolves to dist/, so it looks for dist/package.json which doesn't exist. Node falls back to the parent package.json which doesn't list @lancedb/lancedb.

Workaround:

sudo npm install @lancedb/lancedb@"^0.27.1"
echo '{"dependencies":{"@lancedb/lancedb":"^0.27.1"}}' | sudo tee /usr/lib/node_modules/openclaw/dist/package.json

Environment

  • OS: Ubuntu 24.04 (arm64, NVIDIA DGX Spark)
  • Node: v22.x
  • OpenClaw: v2026.3.28 (npm global install)
  • Install method: npm install -g openclaw

Related

  • #56155 (similar report for BOOTSTRAP.md specifically)

extent analysis

Fix Plan

To resolve the packaging issues, follow these steps:

1. Include workspace templates in dist/

  • Update the package.json file to include the docs/reference/templates directory in the files field:
"files": [
  "...",
  "docs/reference/templates/**/*"
]
  • Alternatively, use a build script to copy the templates to dist/:
npm script: "build:templates": "cp -r docs/reference/templates dist/docs/reference/"

2. Fix @lancedb/lancedb dependency issue

  • Update the lancedb-runtime module to use a relative path to the package.json file:
const lanceDbSpec = JSON.parse(
  fsSync.readFileSync(new URL("../extensions/memory-lancedb/package.json", import.meta.url), "utf8")
).dependencies?.["@lancedb/lancedb"];
  • Alternatively, declare @lancedb/lancedb as a dependency in the main package.json file:
"dependencies": {
  "...",
  "@lancedb/lancedb": "^0.27.1"
}

Verification

After applying these fixes, verify that:

  • The dist/docs/reference/templates directory is present and contains the expected files.
  • The memory-lancedb plugin can be loaded without errors.
  • The @lancedb/lancedb dependency is correctly resolved.

Extra Tips

  • Ensure that the package.json file is correctly configured to include all necessary files and dependencies.
  • Use a build script to automate the process of copying files to dist/.
  • Consider using a more robust way to resolve dependencies, such as using a dependency injection mechanism.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING