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

cf-react-error-reporter

v1.1.1

Published

React library for reporting errors in React applications

Readme

cf-react-error-reporter

Build Status codecov npm

🛡️ A React library that detects runtime errors and automatically creates issues on platforms like GitHub. It also sends alerts via Discord, groups similar errors, and more.


🚀 Installation

npm install cf-react-error-reporter

📦 Key Features

  • Error capture using ErrorBoundary
  • Global error capture (window.onerror, onunhandledrejection)
  • Smart grouping using fingerprint/hash
  • Automatic reporting as GitHub issues
  • Automatic fallback to backend if frontend fails
  • Local storage of pending errors with retry logic
  • Optional Discord notifications
  • Manual hook useErrorReporter() and reportTestError() function

🔧 Basic Setup

import {
  ErrorBoundary,
  configureReporter,
  enableGlobalCapture,
} from "cf-react-error-reporter";

configureReporter({
  provider: "github",
  user: "mi-usuario",
  repo: "mi-repo",
  apiKey: import.meta.env.VITE_GITHUB_TOKEN,
  discordWebhook: import.meta.env.VITE_DISCORD_WEBHOOK, // optional
  onlyInProduction: true,
  mode: "auto", // 'frontend' | 'backend' | 'auto'
});

enableGlobalCapture(); // Enable global error capturing

In your render:

<ErrorBoundary fallback={<div>Something went wrong</div>}>
  <App />
</ErrorBoundary>

🧠 Manual Usage with useErrorReporter()

const { reportError } = useErrorReporter();
reportError(new Error("Something went wrong"), "Optional description");

To test connectivity:

reportTestError();

⚙️ Configuration Options

| Option | Type | Description | | ------------------ | -------------------------------------------- | ------------------------------------------- | | provider | 'github' \| 'gitlab' \| 'trello' \| 'jira' | Integration method | | user | string | GitHub user or organization | | repo | string | Repository to create issues in | | apiKey | string | GitHub Personal Access Token | | backendUrl | string | Optional backend URL (for CORS or security) | | mode | 'frontend' \| 'backend' \| 'auto' | Submission mode | | discordWebhook | string | Discord webhook for alerts | | onlyInProduction | boolean | Only report if NODE_ENV === 'production' |


🔧 Compatibility

The following table show the compatibility with de mode option with the diferents providers

| Provider | Frontend | Backend | | -------- | -------- | ------- | | Github | ✅ | ✅ | | Gitlab | ✅ | ✅ | | Trello | ✅ | ✅ | | Jira | ❌ | ✅ |


🖥️ Optional Backend (Node.js)

Jira has stricter CORS policies, so using the mode front option will result in a CORS error. We can work around this by using the backendUrl option as a fallback. In case of an error with the front option, it will then attempt to use the back option, as long as it has the corresponding property defined.

import express from "express";
import fetch from "node-fetch";
import bodyParser from "body-parser";
import dotenv from "dotenv";
dotenv.config();

const app = express();
app.use(bodyParser.json());

app.post("/report-error", async (req, res) => {
  const { title, body } = req.body;

  const response = await fetch(
    `https://${process.env.JIRA_DOMAIN}/rest/api/3/issue`,
    {
      method: "POST",
      headers: {
        Authorization: `Basic ${Buffer.from(
          `${process.env.JIRA_USER}:${process.env.JIRA_TOKEN}`
        ).toString("base64")}`,
        Accept: "application/json",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        fields: {
          project: { key: process.env.JIRA_PROJECT },
          summary: title,
          description: body,
          issuetype: { name: "Bug" },
        },
      }),
    }
  );

  const data = await response.json();
  res.status(response.status).json(data);
});

app.listen(3001, () =>
  console.log("Jira error reporter backend running on port 3001")
);

📄 Documentation

For more information on how to configure or obtain the necessary values to set up the report, please refer to the provider's documentation.

| Provider | Documentation | | -------- | ------------------------------- | | Gitlab | DOCS | | Trello | DOCS | | Jira | DOCS |


🔐 Security

  • Never expose your apiKey in public environments unless using a backend.
  • Use onlyInProduction: true to avoid reporting during development.

✅ Future Roadmap

  • Recent log capture (console.log, etc)
  • UI for pending errors
  • Export to formats like CSV or JSON
  • Simultaneous multi-platform reporting

📄 License

MIT © 2025 — Made by shakar