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

@fixflow/sdk

v0.1.3

Published

FixFlow SDK for error capture

Readme

FixFlow SDK

Website: tryfixflow.com

Lightweight error capture SDK for Node.js and browser environments.

Install

npm install @fixflow/sdk

Project Key

The PROJECT_KEY is a unique identifier that connects your application to your FixFlow project.

Where to find it:

  1. Sign in to your FixFlow Dashboard.
  2. Create a project (or select an existing one).
  3. (Optional) Connect your repository if you want FixFlow to scan your code for issues and security vulnerabilities.
  4. Your SDK Project Key is displayed in the project header and under the SDK Settings tab in Project Details.

Usage

import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY");

The SDK auto-captures uncaught errors and unhandled promise rejections after initialization.

Usage by environment

API request tracking: In Node.js, outbound HTTP monitoring uses Axios (trackAxios). In the browser you can use trackFetch, Axios, or both.

Browser / frontend

Initialize in your client entry file (for example main.ts or index.tsx) as early as possible so startup errors are captured:

import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY", {
  trackFetch: true, // optional: instruments window.fetch (browser only)
});

Use captureError or capture in catch blocks for handled errors (see Capturing errors manually).

trackFetch instruments window.fetch only and does not patch Node’s global fetch. For all options, see init Options below.

React

Prefer calling init from your entry file before createRoot(...).render(...) when the project key is available there.

If the key only exists on the client (for example a NEXT_PUBLIC_* variable), use a once-only useEffect with an empty dependency array. Do not call init in the component render body:

import { useEffect } from "react";
import fixflow from "@fixflow/sdk";

export function FixFlowInit() {
  useEffect(() => {
    const key = process.env.NEXT_PUBLIC_FIXFLOW_PROJECT_KEY;
    if (key) {
      fixflow.init(key, { trackFetch: true });
    }
  }, []);

  return null;
}

Mount that component once near the root of your tree. Next.js App Router users can wrap it in a small client component used from the root layout.

React Native

Call init at the very top of your entry file (usually App.js or index.js) before your component definition to capture startup errors:

import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY");

Node.js

Call init once at process startup (for example at the top of server.ts, before creating or listening on your HTTP server):

import axios from "axios";
import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY", {
  trackAxios: true,
  axios,
  slowThreshold: 1000,
});

Do not rely on trackFetch for Node in the current SDK; use trackAxios and pass the same axios instance your app uses. See Axios option (important).

init Options

Typical setup combines browser trackFetch with server Axios tracking and passes your app's Axios instance when you use Axios on the server:

import axios from "axios";
import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY", {
  trackFetch: true,
  trackAxios: true,
  slowThreshold: 1000,
  axios,
});

| Option | Type | Default | Description | | --- | --- | --- | --- | | trackFetch | boolean | false | Enables API tracking for window.fetch (browser). | | trackAxios | boolean | false | Enables API tracking for Axios via interceptors. | | slowThreshold | number | 1000 | Request duration threshold in ms used for "slow API" events. Values below 0 are clamped to 0. | | axios | AxiosStatic | undefined | Axios instance to instrument. Recommended for Node apps when trackAxios is enabled. |

At init, the SDK requests GET …/sdk/config/:projectKey on the same API host as ingest (for the default cloud URL, that is https://api.fixflow.ai/sdk/config/:projectKey). It applies apiTrackingEnabled and trackInDevelopment from the project when the response is valid, and otherwise falls back to your trackFetch / trackAxios flags.

Axios option (important)

In Node/npm projects, @fixflow/sdk can have a different installed Axios copy than your app. If that happens, interceptors attached by the SDK will not see requests made by your app's Axios import.

Pass your app's Axios instance so API events are tracked from the client your code actually uses:

import axios from "axios";
import fixflow from "@fixflow/sdk";

fixflow.init("PROJECT_KEY", {
  trackAxios: true,
  axios,
});

Capturing errors manually

try {
  throw new Error("Something failed");
} catch (err) {
  fixflow.captureError(err as Error);
}

You can also call the async capture method directly:

import fixflow from "@fixflow/sdk";

await fixflow.capture(new Error("Manual capture"));