Product How it works Features Security What is bugstack? SDKs JavaScript SDK Python SDK Go SDK Ruby SDK Docs Pricing Blog Book a Demo
Log In Get started
JavaScript · TypeScript

bugstack for JavaScript & TypeScript

The bugstack SDK captures uncaught server errors in Express and Next.js and starts a fix: TypeError, null access, async/await failures, and import errors. It is the crash-capture part of a product that maintains your whole repository.

What JS/TS Errors bugstack Fixes

Install the SDK

Add bugstack to your project with a single command:

npm install bugstack-sdk

Then initialize it in your entry point:

import { bugstack } from 'bugstack-sdk';

bugstack.init({
  apiKey: process.env.BUGSTACK_API_KEY,
});

Example Fix

bugstack detects a TypeError caused by accessing a property on null and writes a small fix:

Before (broken)
export function getUserName(user) {
  return user.profile.name;
}

// Runtime error when user.profile is null:
// TypeError: Cannot read properties
//   of null (reading 'name')
After (fixed by bugstack)
export function getUserName(user) {
  if (!user?.profile) {
    return null;
  }
  return user.profile.name;
}

What else bugstack does for this repository

The SDK is one part. Once your repository is connected, bugstack also scans your npm packages for known vulnerabilities and outdated versions, scans for secrets, and acts on failed deploys if you host on Render. It scans and reports, and it can open pull requests for what it finds. Those pull requests are switched on per account. Every change arrives as a pull request, and you set how much happens without you.

Related Error Guides

Full installation guide with config reference →

Hand off the upkeep of your JavaScript app

bugstack captures uncaught server errors in production, finds the cause, writes the fix, and opens a pull request in minutes. Your CI runs on every change, and you decide how much happens without you.

Get started with your JavaScript app

Connect GitHub. Add the SDK. That's the setup.