Environment and debugging
Node + tsx Crash
This page covers troubleshooting Node.js and tsx crashes when running the OpenClaw gateway or CLI (e.g. node --import tsx, or scripts that use tsx).
Common causes
- Node version: OpenClaw expects Node 22+. Older Node can cause runtime or native-module crashes.
- tsx / loader: Crashes during startup or when loading TypeScript can be due to tsx version,
--importorder, or conflicting loaders. - Memory / native: Large workloads or native addons can trigger OOM or segfaults; see Node.js for version and env guidance.
Quick checks
- Node version: Run
node -v(expect v22 or higher). - Reproduce without tsx: Try running the same flow with plain
nodeand precompiled JS to see if the crash is tsx-specific. - Diagnostics: Use Diagnostics flags (e.g.
OPENCLAW_DEBUG_*) to get more logs before a crash.
Related
- Debugging β runtime overrides, gateway watch, dev profile
- Scripts β helper scripts and conventions
- Node.js β Node version and PATH
- Diagnostics flags β debug and trace flags