Skip to main content

Installation

Beta

This page documents the Bugsee JavaScript SDK, which is in beta (0.1.x) and can change between betas.

The Bugsee JavaScript SDK is a family of npm packages under the @bugsee scope. You install the package that matches where your code runs, plus an adapter if you use a framework. Pick your runtime or framework below; each page has the install command, the setup code and the gotchas for that environment.

New to the SDK? Quick start walks through the common case end to end: install, app token, launch and a first verified report.

Create your app​

You get the app token by creating an application in Bugsee:

  1. Create a new application and choose JavaScript application as its type.
  2. Choose the target you are integrating Bugsee into. The targets are grouped as Frontend frameworks (React, Vue, Angular, Svelte, SolidJS, Preact), Full-stack frameworks (Next.js, Nuxt, Remix, SvelteKit, Astro), Backend frameworks (Express, Fastify, NestJS, Hono, Koa, hapi, Elysia) and Runtimes & environments (Browser, Node.js, Bun, Electron, Cloudflare Workers, Vercel Edge, Web Worker, Service Worker). The target is set once, when the application is created.
  3. Give the application a name and finish creating it.
  4. Bugsee then shows the setup steps for your target: Installation (the npm command) and Configure & launch (the code to add), with your app token already filled into the snippets. Bugsee waits for your first report in a Validation step.

The guides below follow the same targets, so choose the guide that matches the target you picked. Wherever a guide shows <your_app_token>, use the token of your application.

Before you start​

  • Use Node.js 18 or later, or Bun 1.1.13 or later (tested on 1.3), for tooling and servers.
  • The install commands on these pages have no version or tag. While the SDK is in beta, the npm latest tag points at the current beta.

Runtimes and platforms​

Where your code runsInstallGuide
Browser@bugsee/bugseeBrowser
Node.js@bugsee/bugseeNode.js
Bun@bugsee/bunBun
Electron@bugsee/electronElectron
Cloudflare Workers@bugsee/cloudflareCloudflare Workers
Vercel Edge@bugsee/vercel-edgeVercel Edge
Web Worker, Service Worker@bugsee/webworkerWeb and Service Workers

Frontend frameworks​

Install the adapter for your framework. It pulls in @bugsee/bugsee and re-exports it, so one package and one import give you launch plus the error boundary, router and error-handler hooks.

FrameworkInstallGuide
React@bugsee/reactReact
Vue@bugsee/vueVue
Angular@bugsee/angularAngular
Svelte@bugsee/svelteSvelte and SvelteKit
Solid@bugsee/solidSolid

Meta-frameworks​

These cover the client and the server of the framework in one package.

FrameworkInstallGuide
Next.js@bugsee/nextjsNext.js
Nuxt@bugsee/nuxtNuxt
Remix and React Router@bugsee/remixRemix
SvelteKit@bugsee/sveltekitSvelte and SvelteKit
Astro@bugsee/astroAstro

Backend frameworks​

Install the adapter for your server framework. It pulls in @bugsee/bugsee and re-exports it, so launch and the setup function come from one package. See the Backend overview for request context and incoming-request instrumentation.

FrameworkInstallGuide
Express@bugsee/expressExpress
Fastify@bugsee/fastifyFastify
NestJS@bugsee/nestjsNestJS
Hono@bugsee/honoHono
Koa@bugsee/koaKoa
hapi@bugsee/hapihapi
Elysia@bugsee/elysiaElysia

On Bun, also install @bugsee/bun and import launch from it, as described in Running on Bun.

Readable stack traces​

Production bundles are minified. Upload source maps at build time with a bundler plugin, or with the CLI, so reports show your original code:

Which packages do I install?​

You install only the packages in the tables above. The other @bugsee/* packages are dependencies that the SDK pulls in. Packages lists all of them and says which are internal.

Next steps​

Found an issue, typo, or wrong statement on this page? Report it now →