#NPM Modules - Fresh Install

1 messages ยท Page 1 of 1 (latest)

brittle kelp
#

Using the latest version - NPM dependencies always fail.

This one is just an example: Error: Cannot find module '@larksuiteoapi/node-sdk'

cyan pendantBOT
chilly fossilBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

cyan pendantBOT
smoky sealBOT
#

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:

  1. source checkout installed with npm instead of pnpm, or
  2. 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.

brittle kelp
#

version: OpenClaw 2026.4.20-beta.2 (4e25479)
installer script
node v22.22.2

smoky sealBOT
#

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.

brittle kelp
#

openclaw doctor --fix reported Doctor complete. but when i run openclaw onboard it fails again with yet another Cannot find module '@larksuiteoapi/node-sdk'

smoky sealBOT
#

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:

brittle kelp
#

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

smoky sealBOT
#

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.

brittle kelp
#

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

smoky sealBOT
#

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.

brittle kelp
#

i'm using WSL ubuntu 22.04

smoky sealBOT
#

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.

brittle kelp
#

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

smoky sealBOT
#

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:

brittle kelp
#

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

smoky sealBOT
#

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.

brittle kelp
#

~/.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
smoky sealBOT
#

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.

brittle kelp
#

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`
smoky sealBOT
#

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.

brittle kelp
#

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
)`

smoky sealBOT
#

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 ... $SPECS line is what actually installs them

If you want, you can skip the echo "$SPECS" line.

brittle kelp
#
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```
smoky sealBOT
#

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.

brittle kelp
#
bash: !entry.isDirectory: event not found```
smoky sealBOT
#

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.

brittle kelp
#
โ”‚  โ— Use existing values
โ”‚  โ—‹ Update values
โ”‚  โ—‹ Reset
โ””```

what one
smoky sealBOT
#

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.

brittle kelp
#

That fixed it โœ…

smoky sealBOT
#

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.

brittle kelp
smoky sealBOT
#

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.

brittle kelp
#

wrap everything in triple backticks so it's easier to copy

smoky sealBOT
#
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