npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@errpulse/node

v0.6.0

Published

ErrPulse Node.js backend SDK — catch every backend error automatically

Downloads

575

Readme

@errpulse/node

Backend error monitoring SDK for Node.js, Express, and Next.js. Part of ErrPulse — the error monitoring tool that runs with one command.

Installation

npm install @errpulse/node

Quick Start

// Zero-config — auto-captures uncaught exceptions, rejections, console.error
import "@errpulse/node";

That's it. Errors are sent to http://localhost:3800 by default.

What Gets Caught

| Error Type | How | | ------------------------------ | -------------------------------------- | | Uncaught exceptions | process.on('uncaughtException') | | Unhandled promise rejections | process.on('unhandledRejection') | | Express route errors (4xx/5xx) | Error handler middleware | | Next.js API route errors | withErrPulse() wrapper | | console.error calls | Monkey-patch | | console.log/warn/info/debug | Monkey-patch (opt-in) | | Memory warnings | Periodic process.memoryUsage() check | | All HTTP requests | Request handler middleware |

Configuration

import { init } from "@errpulse/node";

init({
  serverUrl: "http://localhost:3800",
  projectId: "my-api",
  enabled: true,
  sampleRate: 1.0,
  captureConsoleErrors: true,
  captureConsoleLogs: false, // opt-in: capture console.log/warn/info/debug to Logs dashboard
  captureUncaughtExceptions: true,
  captureUnhandledRejections: true,
  monitorMemory: true,
  memoryThresholdMB: 512,
  memoryCheckIntervalMs: 30000,
  beforeSend: (event) => event, // Modify or drop events before sending
});

Config Reference

| Option | Type | Default | Description | | ---------------------------- | ---------- | ------------------------- | -------------------------------------------------- | | serverUrl | string | "http://localhost:3800" | ErrPulse server URL | | projectId | string | undefined | Project identifier for multi-project setups | | enabled | boolean | true | Enable or disable the SDK | | sampleRate | number | 1.0 | Sample rate from 0.0 to 1.0 (1.0 = capture all) | | captureConsoleErrors | boolean | true | Capture console.error calls | | captureConsoleLogs | boolean | false | Capture console.log/warn/info/debug to Logs view | | captureUncaughtExceptions | boolean | true | Capture uncaught exceptions | | captureUnhandledRejections | boolean | true | Capture unhandled promise rejections | | monitorMemory | boolean | true | Monitor memory usage and emit warnings | | memoryThresholdMB | number | 512 | Memory threshold in MB before warning | | memoryCheckIntervalMs | number | 30000 | How often to check memory (ms) | | beforeSend | function | undefined | Callback to modify or drop events before sending |

Express Integration

import express from "express";
import { init, expressRequestHandler, expressErrorHandler } from "@errpulse/node";

init({ serverUrl: "http://localhost:3800", projectId: "my-api" });

const app = express();
app.use(expressRequestHandler()); // Track all requests — must be first
// ... your routes ...
app.use(expressErrorHandler()); // Catch route errors — must be last

The request handler captures:

  • HTTP method, URL, status code, and response duration
  • Correlation ID (from X-ErrPulse-Correlation-ID header, or auto-generated)
  • Request and response headers (sensitive headers redacted)
  • Request and response bodies (capped at 16 KB)

Next.js Integration

import { withErrPulse } from "@errpulse/node";

export const GET = withErrPulse(async (req) => {
  const data = await db.query();
  return Response.json({ data });
});

Manual Capture

import { captureError, captureMessage } from "@errpulse/node";

captureError(new Error("Payment failed"), { userId: "123" });
captureMessage("Deployment started", "info", { version: "2.0" });

Graceful Shutdown

import { close } from "@errpulse/node";

process.on("SIGTERM", () => {
  close(); // Flushes buffered events and removes all listeners
  process.exit(0);
});

Error Correlation

When paired with @errpulse/react, the backend SDK reads the X-ErrPulse-Correlation-ID header injected by the frontend. The dashboard shows the full chain: user action -> frontend request -> backend error.

Documentation

License

MIT