#NPM Modules - Fresh Install
1 messages ยท Page 1 of 1 (latest)
I want to avoid guessing here, so Iโm checking the published tarball directly before I tell them whether this is user-side or a real packaging regression.
That error usually means one of two things:
- source checkout installed with
npminstead ofpnpm, or - the bundled-plugin postinstall step didnโt run, so plugin runtime deps never got restored.
A few quick checks first, please paste:
openclaw --version
node -v
npm config get ignore-scripts
and tell me how you installed it:
npm install -g openclaw- installer script
- git/source checkout
Likely fixes
If this is a git/source checkout:
pnpm install
pnpm build
pnpm ui:build
If this is a global install:
openclaw doctor --fix
That specifically repairs missing bundled plugin runtime deps.
If ignore-scripts is true, that would also explain it, because the package uses a postinstall step to restore those plugin deps.
Docs:
Paste the version + install method and Iโll narrow it down fast.
version: OpenClaw 2026.4.20-beta.2 (4e25479)
installer script
node v22.22.2
Theyโre on the installer path, so Iโm checking the install docs/release flow to avoid telling them the wrong recovery steps.
Yep, that combo is supported, so this is not just โwrong Node / wrong install methodโ.
What this looks like is: the bundled plugin runtime deps repair step got skipped or failed during install. @larksuiteoapi/node-sdk is one of those.
Please run:
openclaw doctor --fix
openclaw gateway restart
Thatโs the documented repair path for missing bundled plugin deps:
If it still blows up, paste these 3 outputs:
openclaw doctor --fix
npm config get ignore-scripts
openclaw gateway status
If ignore-scripts is true, that would explain it immediately. If not, then Iโm leaning toward a beta.2 installer regression and we can narrow it down from the doctor output.
openclaw doctor --fix reported Doctor complete. but when i run openclaw onboard it fails again with yet another Cannot find module '@larksuiteoapi/node-sdk'
Doctor saying โcompleteโ but onboard still crashing is a clue. Iโm checking whether onboard uses a different package root or upgrade path than doctor.
I think thereโs a decent chance onboard is talking to an older loaded gateway install, while doctor is checking the newer CLI package. Iโm verifying the doc-supported path for that before I tell them.
Ah, thatโs a useful clue.
If doctor --fix says complete but onboard still crashes with the same missing module, Iโd suspect a split install: the CLI youโre running and the loaded gateway service are not using the same OpenClaw package root.
The installer only auto-refreshes a gateway loaded from the same prefix, so an older service/install can survive.
Try this exact sequence:
openclaw gateway install --force
openclaw gateway restart
openclaw onboard
If it still fails, please paste these:
openclaw gateway status --deep
openclaw doctor --deep
which openclaw
doctor --deep is the doc-backed check for extra gateway installs/services:
If those outputs show an older service hanging around, thatโs almost certainly the bug here.
REDACTED = my username
REDACTED@Le-PC:~$ openclaw gateway status
๐ฆ OpenClaw 2026.4.20-beta.2 (4e25479) โ The only open-source project where the mascot could eat the competition.
โ
โ
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-22.log
Command: /usr/bin/node /home/REDACTED/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state failed, sub failed, last exit 78, reason 1)
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-04-22.log
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Restart attempts: /home/REDACTED/.openclaw/logs/gateway-restart.log
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Nice, this output has the smoking gun.
Your gateway service is starting this exact install:
/home/REDACTED/.npm-global/lib/node_modules/openclaw
So Iโd check and repair that package root directly.
1) Check whether the missing dep is actually there
ls ~/.npm-global/lib/node_modules/openclaw/node_modules/@larksuiteoapi/node-sdk/package.json
2) If that says โNo such fileโ, run the packageโs bundled-runtime repair script directly
node ~/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs
openclaw gateway restart
3) Also paste this
which openclaw
Why Iโm focusing there: gateway status shows systemd is launching the copy under ~/.npm-global/..., so if that install is missing bundled plugin deps, the service will keep dying no matter what onboarding does.
If this manual repair fixes it, Iโd honestly treat that as a beta installer/doctor regression and file it here:
https://github.com/openclaw/openclaw/issues
If you paste the ls result + which openclaw, I can tell you the next step right away.
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ node ~/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs
openclaw gateway restart
file:///home/REDACTED/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs:203
throw new Error(
^
Error: unsafe dist entry: dist/extensions/microsoft/node_modules/.bin/node-edge-tts
at listInstalledDistFiles (file:///home/REDACTED/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs:203:15)
at pruneInstalledPackageDist (file:///home/REDACTED/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs:289:26)
at runBundledPluginPostinstall (file:///home/REDACTED/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs:709:27)
at file:///home/REDACTED/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs:825:3
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:665:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Node.js v22.22.2
๐ฆ OpenClaw 2026.4.20-beta.2 (4e25479) โ Your config is valid, your assumptions are not.
Restarted systemd service: openclaw-gateway.service
Gateway restart failed after 13s: service stayed stopped and port 18789 stayed free.
Service runtime: status=stopped, state=failed, lastExit=78
Gateway port 18789 status: free.
Gateway restart failed after 13s: service stayed stopped and health checks never came up.
Tip: openclaw gateway status --deep
Tip: openclaw doctor
Okay, we found the real bug.
This is not just a missing npm dep now. The installed package has a stale plugin-local node_modules inside dist/:
dist/extensions/microsoft/node_modules/.bin/node-edge-tts
That should not be there in a clean installed build, and itโs exactly why the repair script is bailing out with unsafe dist entry.
Safest targeted fix
Donโt delete it yet, just move it aside:
mv ~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules \
~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules.bak
node ~/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs
openclaw gateway restart
If it then complains about another dist/extensions/*/node_modules, move that one aside too and rerun.
Heavier fallback
If youโd rather do a clean reinstall of that exact global install:
npm uninstall -g openclaw
npm install -g openclaw@2026.4.20-beta.2
openclaw gateway install --force
openclaw gateway restart
This really does look like a beta installer/update regression. If the move-aside fix works, please file it here so it gets fixed properly:
https://github.com/openclaw/openclaw/issues
Paste the next error if you get one, I think weโre very close now.
i'm using WSL ubuntu 22.04
Good to know. WSL 22.04 is supported, and I donโt think WSL is the root cause here.
The key detail is that the broken install is under:
~/.npm-global/lib/node_modules/openclaw
So even though your shell is sitting in /mnt/c/..., the actual bad state is in your Linux home, not the Windows mount.
Iโd still use the same fix path:
mv ~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules \
~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules.bak
node ~/.npm-global/lib/node_modules/openclaw/scripts/postinstall-bundled-plugins.mjs
openclaw gateway restart
If you want the cleaner WSL route instead, do the full reinstall in Linux home:
npm uninstall -g openclaw
npm install -g openclaw@2026.4.20-beta.2
openclaw gateway install --force
openclaw gateway restart
So: WSL is probably incidental, stale package contents are the real bug.
mv ~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules
~/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules.bak
mv: cannot stat '/home/REDACTED/.npm-global/lib/node_modules/openclaw/dist/extensions/microsoft/node_modules': No such file or directory
Got it. At that point Iโd stop doing package-tree surgery.
If the repair script sees an unsafe dist/.../node_modules/... path but a normal mv canโt even stat the parent dir, the install is inconsistent enough that a clean reinstall is the better move.
On WSL, Iโd use the local-prefix installer so OpenClaw lives under ~/.openclaw instead of ~/.npm-global.
Cleanest reset path
openclaw gateway uninstall
npm uninstall -g openclaw
curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --version 2026.4.20-beta.2
~/.openclaw/bin/openclaw gateway install --force
~/.openclaw/bin/openclaw gateway restart
If youโd rather jump off beta while debugging, swap the install line for:
curl -fsSL https://openclaw.ai/install-cli.sh | bash
Docs:
Honestly, this is looking like a real beta install/update bug, not user error. If the clean reinstall fixes it, please file it:
https://github.com/openclaw/openclaw/issues
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ openclaw gateway uninstall
๐ฆ OpenClaw 2026.4.20-beta.2 (4e25479) โ Gateway onlineโplease keep hands, feet, and appendages inside the shell at all times.
Stopped systemd service: openclaw-gateway.service
Removed systemd service: /home/REDACTED/.config/systemd/user/openclaw-gateway.service
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ npm uninstall -g openclaw
removed 454 packages in 3s
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --version 2026.4.20-beta.2
Installing Node 22.22.0 (user-space)...
Installing OpenClaw (2026.4.20-beta.2)...
added 454 packages in 29s
OpenClaw installed (OpenClaw 2026.4.20-beta.2 (4e25479)).
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ ~/.openclaw/bin/openclaw gateway install --force
๐ฆ OpenClaw 2026.4.20-beta.2 (4e25479) โ Type the command with confidenceโnature will provide the stack trace if needed.
01:16:39 [plugins] amazon-bedrock installed bundled runtime deps: @aws-sdk/client-bedrock@3.1032.0
01:16:42 [plugins] amazon-bedrock-mantle installed bundled runtime deps: @aws/bedrock-token-generator@^1.1.0
Installed systemd service: /home/REDACTED/.config/systemd/user/openclaw-gateway.service
REDACTED@Le-PC:/mnt/c/Users/REDACTED$ ~/.openclaw/bin/openclaw gateway restart
๐ฆ OpenClaw 2026.4.20-beta.2 (4e25479) โ I run on caffeine, JSON5, and the audacity of "it worked on my machine."
Restarted systemd service: openclaw-gateway.service
Gateway restart failed after 13s: service stayed stopped and port 18789 stayed free.
Service runtime: status=stopped, state=failed, lastExit=78
Gateway port 18789 status: free.
Gateway restart failed after 13s: service stayed stopped and health checks never came up.
Tip: openclaw gateway status --deep
Tip: openclaw doctor
Thatโs actually progress.
The old broken ~/.npm-global install is gone, and the new ~/.openclaw install is at least far enough along to repair bundled plugin deps. So weโre past the original split-install mess.
Now we need the actual startup error from the new service.
For the next commands, use the explicit binary so PATH canโt lie to us:
~/.openclaw/bin/openclaw gateway status --deep
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
If you want the fastest direct stack trace, also try:
~/.openclaw/bin/openclaw gateway --port 18789
and paste the first fatal error / stack it prints.
At this point Iโm pretty sure the dependency story was only the first symptom, and the service logs will show the real blocker.
~/.openclaw/bin/openclaw onboard failed at the step
โ OpenAI OAuth complete
โ
โ Model configured โโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Default model set to openai-codex/gpt-5.4 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ
โ Default model
โ Keep current (openai-codex/gpt-5.4)
Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /home/
REDACTED/.openclaw/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js
Perfect, now we have a concrete miss.
The new install is still failing because the Feishu bundled runtime dep never got installed into the OpenClaw package root.
Fastest workaround, install exactly the missing dep where OpenClaw lives:
cd ~/.openclaw/lib/node_modules/openclaw
npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps @larksuiteoapi/node-sdk@^1.60.0
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
That npm install ... --no-save --ignore-scripts is basically the same repair shape OpenClawโs doctor uses for bundled plugin runtime deps.
If that works, Iโd definitely file this as a bug, because installer + doctor should have handled it automatically:
https://github.com/openclaw/openclaw/issues
If it fails again, paste the next missing package name. Weโre in whack-a-mole territory now, but at least itโs a very specific mole.
again:
`โ OpenAI OAuth complete
โ
โ Model configured โโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Default model set to openai-codex/gpt-5.4 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ
โ Default model
โ Keep current (openai-codex/gpt-5.4)
Error: Cannot find module 'nostr-tools'
Require stack:
- /home/
REDACTED/.openclaw/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-d0cfZ0y8.js`
Iโm pulling the actual bundled runtime-dependency list from the repo so I can give them one install command instead of playing dependency whack-a-mole.
Yep, that confirms it.
This is systemic, not Feishu-specific. The bundled-extension runtime dep mirror step is missing multiple packages (@larksuiteoapi/node-sdk, now nostr-tools, probably more).
Rather than keep playing whack-a-mole, batch-install everything declared by the bundled extension manifests in your installed OpenClaw package:
cd ~/.openclaw/lib/node_modules/openclaw
SPECS=$(node <<'NODE'
const fs = require('fs');
const path = require('path');
const root = path.join(process.cwd(), 'dist', 'extensions');
const seen = new Map();
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const pkgPath = path.join(root, entry.name, 'package.json');
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
for (const [name, version] of Object.entries(pkg.dependencies || {})) {
if (!seen.has(name)) seen.set(name, `${name}@${version}`);
}
}
process.stdout.write([...seen.values()].join(' '));
NODE
)
npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $SPECS
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
Itโs ugly, but it should stop the repeated missing-module failures in one shot.
At this point Iโm comfortable calling this a real installer/doctor regression in this beta:
https://github.com/openclaw/openclaw/issues
If that command blows up, paste the npm error, not just the next onboard error.
what to dow with this?
`SPECS=$(node <<'NODE'
const fs = require('fs');
const path = require('path');
const root = path.join(process.cwd(), 'dist', 'extensions');
const seen = new Map();
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const pkgPath = path.join(root, entry.name, 'package.json');
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
for (const [name, version] of Object.entries(pkg.dependencies || {})) {
if (!seen.has(name)) seen.set(name, ${name}@${version});
}
}
process.stdout.write([...seen.values()].join(' '));
NODE
)`
That snippet just creates a shell variable named SPECS.
You donโt do anything with it by itself, other than use it in the next command.
Copy-paste this whole block:
cd ~/.openclaw/lib/node_modules/openclaw
SPECS=$(node <<'NODE'
const fs = require('fs');
const path = require('path');
const root = path.join(process.cwd(), 'dist', 'extensions');
const seen = new Map();
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const pkgPath = path.join(root, entry.name, 'package.json');
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
for (const [name, version] of Object.entries(pkg.dependencies || {})) {
if (!seen.has(name)) seen.set(name, `${name}@${version}`);
}
}
process.stdout.write([...seen.values()].join(' '));
NODE
)
echo "$SPECS"
npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $SPECS
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
echo "$SPECS"lets you see the package list- the
npm install ... $SPECSline is what actually installs them
If you want, you can skip the echo "$SPECS" line.
const fs = require('fs');
const path = require('path');
const root = path.join(process.cwd(), 'dist', 'extensions');
const seen = new Map();
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
:joy:
Click to react
:fire:
Click to react
:saluting_face:
Click to react
Add Reaction
Reply
Forward
More
[01:30]Wednesday, 22 April 2026 01:30
if (!entry.isDirectory()) continue;
const pkgPath = path.join(root, entry.name, 'package.json');
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
for (const [name, version] of Object.entries(pkg.dependencies || {})) {
if (!seen.has(name)) seen.set(name, `${name}@${version}`);
}
}
process.stdout.write([...seen.values()].join(' '));
NODE
)
echo "$SPECS"
[stdin]:7
:joy:
^
Expression expected
SyntaxError: Unexpected token ':'
at makeContextifyScript (node:internal/vm:185:14)
at compileScript (node:internal/process/execution:383:10)
at evalTypeScript (node:internal/process/execution:256:22)
at node:internal/main/eval_stdin:53:5
at Socket.<anonymous> (node:internal/process/execution:201:5)
at Socket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1698:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
Node.js v22.22.2```
Yep, Discord mangled the paste and injected UI text into the heredoc. Not your fault ๐
Use this one-liner instead, it avoids the multiline paste problem:
cd ~/.openclaw/lib/node_modules/openclaw && npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $(node -e "const fs=require('fs'),path=require('path');const root=path.join(process.cwd(),'dist','extensions');const seen=new Map();for(const entry of fs.readdirSync(root,{withFileTypes:true})){if(!entry.isDirectory())continue;const pkgPath=path.join(root,entry.name,'package.json');if(!fs.existsSync(pkgPath))continue;const pkg=JSON.parse(fs.readFileSync(pkgPath,'utf8'));for(const [name,version] of Object.entries(pkg.dependencies||{})){if(!seen.has(name))seen.set(name,name+'@'+version);}}process.stdout.write([...seen.values()].join(' '));")
Then run:
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
If npm install itself errors, paste that error, thatโs the useful part now.
bash: !entry.isDirectory: event not found```
Yep, thatโs Bash history expansion tripping on !. Annoying, but easy fix.
Use this version instead, with the Node script in single quotes:
cd ~/.openclaw/lib/node_modules/openclaw && npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $(node -e 'const fs=require("fs"),path=require("path");const root=path.join(process.cwd(),"dist","extensions");const seen=new Map();for(const entry of fs.readdirSync(root,{withFileTypes:true})){if(!entry.isDirectory())continue;const pkgPath=path.join(root,entry.name,"package.json");if(!fs.existsSync(pkgPath))continue;const pkg=JSON.parse(fs.readFileSync(pkgPath,"utf8"));for(const [name,version] of Object.entries(pkg.dependencies||{})){if(!seen.has(name))seen.set(name,name+"@"+version);}}process.stdout.write([...seen.values()].join(" "));')
Then:
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
If that still errors, paste the npm install output. Thatโs the bit we need now.
โ โ Use existing values
โ โ Update values
โ โ Reset
โ```
what one
Use existing values.
Youโve already got valid config and OAuth progress, so Reset would just throw away work, and Update values is only if you want to change config manually right now.
So for this run:
- Use existing values โ
If we later decide the config itself is cursed, we can reset on purpose, but I wouldnโt do that yet.
That fixed it โ
Nice, glad we got it ๐
This really looks like a beta regression in bundled plugin runtime-dep repair/install, especially on your WSL setup. If you can, please file it here so it gets fixed properly:
https://github.com/openclaw/openclaw/issues
And if this fixed it, please right-click the solution message โ Apps โ โ Mark Solution so Answer Overflow can index it for the next person.
write a bug report to file at https://github.com/openclaw/openclaw/issues
Hereโs a ready-to-paste issue:
Title
2026.4.20-beta.2 on WSL Ubuntu 22.04: bundled extension runtime deps missing after install/onboard, doctor --fix reports complete
Body
## Summary
On WSL Ubuntu 22.04, a fresh install of OpenClaw `2026.4.20-beta.2` left bundled extension runtime deps missing.
`openclaw doctor --fix` reported `Doctor complete.`, but `openclaw onboard` still failed with missing-module errors from bundled extensions, for example:
- `Cannot find module '@larksuiteoapi/node-sdk'`
- `Cannot find module 'nostr-tools'`
I was only able to get it working by manually installing all dependencies declared by `dist/extensions/*/package.json` into the installed OpenClaw package root.
## Environment
- OpenClaw: `2026.4.20-beta.2 (4e25479)`
- OS: WSL Ubuntu 22.04
- Node: `v22.22.2`
## Install methods tested
### 1) Initial install path
- installer script
- service path ended up under `~/.npm-global/lib/node_modules/openclaw`
### 2) Clean reinstall
I then did a full clean reinstall to the local-prefix install path:
```bash
openclaw gateway uninstall
npm uninstall -g openclaw
curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --version 2026.4.20-beta.2
~/.openclaw/bin/openclaw gateway install --force
~/.openclaw/bin/openclaw gateway restart
The reinstall still had the same class of missing bundled runtime deps during onboard.
Expected behavior
A fresh install + openclaw doctor --fix + openclaw onboard should work without any manual npm installs into the OpenClaw package directory.
## Actual behavior
`openclaw onboard` failed during onboarding with:
```text
Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /home/<user>/.openclaw/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js
After manually installing that package, onboard failed again with:
Error: Cannot find module 'nostr-tools'
Require stack:
- /home/<user>/.openclaw/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-d0cfZ0y8.js
So this does not seem Feishu-specific, it looks like a broader bundled runtime-dependency install/mirroring problem.
Also, on the older `~/.npm-global` install, manually running the postinstall repair script failed with:
```text
Error: unsafe dist entry: dist/extensions/microsoft/node_modules/.bin/node-edge-tts
What doctor --fix did
openclaw doctor --fix reported:
Doctor complete.
It did not flag or repair the missing bundled extension deps.
## Workaround that fixed it
I had to manually batch-install all deps declared by the bundled extension manifests:
```bash
cd ~/.openclaw/lib/node_modules/openclaw && npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $(node -e 'const fs=require("fs"),path=require("path");const root=path.join(process.cwd(),"dist","extensions");const seen=new Map();for(const entry of fs.readdirSync(root,{withFileTypes:true})){if(!entry.isDirectory())continue;const pkgPath=path.join(root,entry.name,"package.json");if(!fs.existsSync(pkgPath))continue;const pkg=JSON.parse(fs.readFileSync(pkgPath,"utf8"));for(const [name,version] of Object.entries(pkg.dependencies||{})){if(!seen.has(name))seen.set(name,name+"@"+version);}}process.stdout.write([...seen.values()].join(" "));')
After that:
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
worked.
## Notes
This feels like one of:
- bundled plugin runtime deps are not being mirrored/installed correctly on this beta
- `doctor --fix` is not detecting all missing bundled runtime deps
- install/update can leave stale/unsafe `dist/extensions/*/node_modules` state behind
If you want, I can also trim that into a shorter GitHub-style version.
wrap everything in triple backticks so it's easier to copy
Title:
2026.4.20-beta.2 on WSL Ubuntu 22.04: bundled extension runtime deps missing after install/onboard, doctor --fix reports complete
Body:
## Summary
On WSL Ubuntu 22.04, a fresh install of OpenClaw `2026.4.20-beta.2` left bundled extension runtime deps missing.
`openclaw doctor --fix` reported `Doctor complete.`, but `openclaw onboard` still failed with missing-module errors from bundled extensions, for example:
- `Cannot find module '@larksuiteoapi/node-sdk'`
- `Cannot find module 'nostr-tools'`
I was only able to get it working by manually installing all dependencies declared by `dist/extensions/*/package.json` into the installed OpenClaw package root.
## Environment
- OpenClaw: `2026.4.20-beta.2 (4e25479)`
- OS: WSL Ubuntu 22.04
- Node: `v22.22.2`
## Install methods tested
### 1) Initial install path
- installer script
- service path ended up under `~/.npm-global/lib/node_modules/openclaw`
### 2) Clean reinstall
I then did a full clean reinstall to the local-prefix install path:
```bash
openclaw gateway uninstall
npm uninstall -g openclaw
curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --version 2026.4.20-beta.2
~/.openclaw/bin/openclaw gateway install --force
~/.openclaw/bin/openclaw gateway restart
The reinstall still had the same class of missing bundled runtime deps during onboard.
Expected behavior
A fresh install + openclaw doctor --fix + openclaw onboard should work without any manual npm installs into the OpenClaw package directory.
## Actual behavior
`openclaw onboard` failed during onboarding with:
```text
Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /home/<user>/.openclaw/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js
After manually installing that package, onboard failed again with:
Error: Cannot find module 'nostr-tools'
Require stack:
- /home/<user>/.openclaw/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-d0cfZ0y8.js
So this does not seem Feishu-specific, it looks like a broader bundled runtime-dependency install/mirroring problem.
Also, on the older `~/.npm-global` install, manually running the postinstall repair script failed with:
```text
Error: unsafe dist entry: dist/extensions/microsoft/node_modules/.bin/node-edge-tts
What doctor --fix did
openclaw doctor --fix reported:
Doctor complete.
It did not flag or repair the missing bundled extension deps.
## Workaround that fixed it
I had to manually batch-install all deps declared by the bundled extension manifests:
```bash
cd ~/.openclaw/lib/node_modules/openclaw && npm install --omit=dev --no-save --package-lock=false --ignore-scripts --legacy-peer-deps $(node -e 'const fs=require("fs"),path=require("path");const root=path.join(process.cwd(),"dist","extensions");const seen=new Map();for(const entry of fs.readdirSync(root,{withFileTypes:true})){if(!entry.isDirectory())continue;const pkgPath=path.join(root,entry.name,"package.json");if(!fs.existsSync(pkgPath))continue;const pkg=JSON.parse(fs.readFileSync(pkgPath,"utf8"));for(const [name,version] of Object.entries(pkg.dependencies||{})){if(!seen.has(name))seen.set(name,name+"@"+version);}}process.stdout.write([...seen.values()].join(" "));')
After that:
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw onboard
worked.
## Notes
This feels like one of:
- bundled plugin runtime deps are not being mirrored/installed correctly on this beta
- `doctor --fix` is not detecting all missing bundled runtime deps
- install/update can leave stale/unsafe `dist/extensions/*/node_modules` state behind