Install
openclaw skills install nodejsWrite reliable Node.js avoiding event loop blocking, async pitfalls, ESM gotchas, and memory leaks.
openclaw skills install nodejs| Topic | File |
|---|---|
| Callbacks, Promises, async/await, event loop | async.md |
| CommonJS vs ESM, require vs import | modules.md |
| Error handling, uncaught exceptions | errors.md |
| Readable, Writable, Transform, backpressure | streams.md |
| Memory leaks, event loop blocking, profiling | performance.md |
| Input validation, dependencies, env vars | security.md |
| Jest, Mocha, mocking, integration tests | testing.md |
| npm, package.json, lockfiles, publishing | packages.md |
fs.readFileSync blocks entire server — use fs.promises.readFile.catch() or try/catchprocess.env values are strings — "3000" not 3000, parseInt neededJSON.parse throws on invalid — wrap in try/catchrequire() cached — same object, mutations visible everywhereremoveListener or once()async always returns Promise — even for plain returnpipeline() over .pipe() — handles errors and cleanup__dirname in ESM — use fileURLToPath(import.meta.url)Buffer.from(string) — encoding matters, default UTF-8