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

@nacew/server-errors

v0.2.0

Published

uTestMe server errors for Node.js, and (`/edge`) for Supabase Edge Functions, Cloudflare Workers and Vercel Edge: unhandled exceptions with their request, breadcrumbs, and requests and 5xx per minute.

Readme

@nacew/server-errors

Server errors for Node.js apps, sent to uTestMe: every exception the app does not handle, with its type, stack and the request it happened in, the console lines just before it, and requests and 5xx responses per minute.

It never sends request bodies, headers, cookies or query strings, and uTestMe removes secrets from what it does send. It never changes how the app behaves: a crash still crashes (the error is sent on the way down).

Install

npm install @nacew/server-errors

Get a key in uTestMe: Logs → Add server or app → An app. Put it in the app's environment:

UTESTME_KEY=utm_sk_…
UTESTME_URL=https://utest.me

Express (or any Connect-style server)

const utestme = require("@nacew/server-errors");
utestme.init({ app: "shop-api", release: process.env.GIT_SHA });

app.use(utestme.requestHandler()); // first: counts requests, remembers the request
// … your routes …
app.use(utestme.errorHandler()); // last: sends errors that become a 5xx

Next.js 15+

// instrumentation.ts
import { init, captureRequestError } from "@nacew/server-errors";

export function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") init({ app: "shop" });
}

export const onRequestError = captureRequestError;

Anywhere else

const { captureException, flush, setUser, addBreadcrumb } = require("@nacew/server-errors");

try {
  await chargeOrder(order);
} catch (err) {
  captureException(err, { tags: { job: "charge" } });
  throw err;
}

// A script or a serverless function that is about to end:
await flush();

Edge functions (Supabase, Cloudflare Workers, Vercel Edge)

@nacew/server-errors/edge uses only fetch and Web APIs, nothing from Node. It counts each response by status, sends an error the handler throws (then throws it on), and sends before the function is frozen, through the platform's waitUntil when there is one.

// supabase/functions/checkout/index.ts  (supabase secrets set UTESTME_KEY=… UTESTME_URL=…)
import { init, withUTestMe } from "npm:@nacew/server-errors/edge";

init({ app: "checkout" });

Deno.serve(
  withUTestMe(async (req) => {
    // …
    return new Response("ok");
  }),
);

On Cloudflare Workers, call init({ key: env.UTESTME_KEY, url: env.UTESTME_URL }) inside the handler, since env only exists there. captureException(err) and await flush() work anywhere.

Options

| Option | Default | What it does | | -------------------- | --------------------------------- | ------------------------------------------------------- | | key | UTESTME_KEY | The app's key. Without one, nothing is sent. | | url | UTESTME_URL, https://utest.me | Where uTestMe is. | | app | UTESTME_APP, the package name | The service's name on each error. | | release | UTESTME_RELEASE | The version running, to tie errors to a deploy. | | environment | UTESTME_ENVIRONMENT, NODE_ENV | | | flushIntervalMs | 5000 | How often errors and counts are sent. | | captureUncaught | true | Send uncaught exceptions and unhandled rejections. | | consoleBreadcrumbs | true | Keep the last 10 console lines as each error's context. | | beforeSend | | Change an error, or return null to drop it. |

Node 18 or later.