openclaw - 💡(How to fix) Fix Missing @slack/web-api and @slack/bolt dependencies cause HTTP 500 on all requests [1 comments, 2 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#58960Fetched 2026-04-08 02:30:43
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
commented ×1

On a fresh install of [email protected], every HTTP request to the gateway returns 500 Internal Server Error — including the Control UI, API endpoints, and RPC. WebSocket connections work fine.

Error Message

On a fresh install of [email protected], every HTTP request to the gateway returns 500 Internal Server Error — including the Control UI, API endpoints, and RPC. WebSocket connections work fine. However, neither @slack/web-api nor @slack/bolt are listed in dependencies or optionalDependencies in package.json. If these packages are not already present (e.g., from a previous install or another package), the static import fails, and the top-level HTTP request handler catches the error with a bare catch {} that returns 500 with no logging. 4. Visit http://127.0.0.1:18789/ → 500 Internal Server Error 3. At minimum, add error logging to the catch block so the issue is diagnosable without patching the source

Root Cause

The gateway bundles Slack support via static imports in dist/runtime-api-DARHIvKf.js:

import { WebClient } from "@slack/web-api";

and dist/gateway-cli-ChUE8Mp7.js imports dist/slack-DiN3Va_Q.js and dist/slack-core-CMYHF92c.js which also depend on @slack/web-api and @slack/bolt.

However, neither @slack/web-api nor @slack/bolt are listed in dependencies or optionalDependencies in package.json. If these packages are not already present (e.g., from a previous install or another package), the static import fails, and the top-level HTTP request handler catches the error with a bare catch {} that returns 500 with no logging.

Fix Action

Workaround

npm i -g @slack/web-api @slack/bolt

Code Example

import { WebClient } from "@slack/web-api";

---

npm i -g @slack/web-api @slack/bolt
RAW_BUFFERClick to expand / collapse

Description

On a fresh install of [email protected], every HTTP request to the gateway returns 500 Internal Server Error — including the Control UI, API endpoints, and RPC. WebSocket connections work fine.

Root Cause

The gateway bundles Slack support via static imports in dist/runtime-api-DARHIvKf.js:

import { WebClient } from "@slack/web-api";

and dist/gateway-cli-ChUE8Mp7.js imports dist/slack-DiN3Va_Q.js and dist/slack-core-CMYHF92c.js which also depend on @slack/web-api and @slack/bolt.

However, neither @slack/web-api nor @slack/bolt are listed in dependencies or optionalDependencies in package.json. If these packages are not already present (e.g., from a previous install or another package), the static import fails, and the top-level HTTP request handler catches the error with a bare catch {} that returns 500 with no logging.

Reproduction

  1. Install openclaw 2026.3.31 on a clean environment
  2. Do NOT have @slack/web-api or @slack/bolt installed globally
  3. Start the gateway
  4. Visit http://127.0.0.1:18789/ → 500 Internal Server Error

Workaround

npm i -g @slack/web-api @slack/bolt

Expected Behavior

Either:

  1. Add @slack/web-api and @slack/bolt to dependencies (preferred), or
  2. Use dynamic/lazy imports for Slack modules so they only load when Slack channel is configured, or
  3. At minimum, add error logging to the catch block so the issue is diagnosable without patching the source

Environment

  • openclaw: 2026.3.31
  • OS: Linux (WSL2)
  • Node: v22.22.0
  • No Slack channel configured

extent analysis

TL;DR

Install @slack/web-api and @slack/bolt as dependencies to resolve the 500 Internal Server Error issue.

Guidance

  • Verify that @slack/web-api and @slack/bolt are not already installed globally by running npm ls -g @slack/web-api @slack/bolt.
  • Add @slack/web-api and @slack/bolt to the dependencies section in package.json to ensure they are installed with the project.
  • As a temporary workaround, install @slack/web-api and @slack/bolt globally using npm i -g @slack/web-api @slack/bolt.
  • Consider using dynamic imports for Slack modules to avoid loading them when not needed.

Example

No code snippet is necessary in this case, as the solution involves installing dependencies or modifying the package.json file.

Notes

This solution assumes that the issue is caused by the missing dependencies @slack/web-api and @slack/bolt. If the issue persists after installing these dependencies, further debugging may be necessary.

Recommendation

Apply the workaround by installing @slack/web-api and @slack/bolt as dependencies, as this is the most straightforward solution to resolve the issue.

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