We're working on something new! Hook Relay gives you Stripe-quality webhooks in minutes. Sign up for free today!

honeybadger.js is now universal

Some devs use JavaScript in the browser; some use JavaScript on the server. What if you do both?

For years, Honeybadger has supported client-side JavaScript and Node.js via two separate NPM packages: honeybadger-js (client-side) and honeybadger (Node.js). Today, we're excited to release a new universal package for JavaScript: @honeybadger-io/js.

The following packages are deprecated moving forward:

Use @honeybadger-io/js instead.

Why make this change?

Combining our JavaScript packages means we can share the same core client code while integrating deeply with each environment. The result is less duplication, better consistency, and a more straightforward experience for universal/isomorphic apps that run in multiple environments via Server-side Rendering (SSR).

Do I have to upgrade?

The short answer: You can keep using the old packages (for now), but why would you when upgrading is so easy? See How to upgrade.

The long answer: We will continue to support the old packages, fix bugs, etc., for now. All new development for client-side JavaScript and Node.js will happen on @honeybadger-io/js (the GitHub repo is here).

We plan to deprecate the old packages on NPM in the future to encourage more users to upgrade—if you do it now, you won't have to worry about any of that! :)

How to upgrade

Upgrading to the new @honeybadger-io/js package should take 5 minutes or less for most users. If you have a simple installation, the process has just two steps:

  1. Replace your current package(s) with @honeybadger-io/js, i.e.:

      npm uninstall honeybadger-js honeybadger
      npm install @honeybadger-io/js
  2. Replace any import/require statements that reference the old package(s):

      const Honeybadger = require('@honeybadger-io/js');
      // Or:
      // import Honeybadger from '@honeybadger-io/js';
        apiKey: 'project api key',
        environment: 'production',
        revision: 'git SHA/project version'

If you use a lot of custom configuration, it may take a little bit longer, as there are a few minor breaking changes. For details, check out the complete upgrading guide.

CDN users

If you use our CDN, replace your current script tag with the v3.0 script tag:

<script src="//js.honeybadger.io/v4.0/honeybadger.min.js" type="text/javascript"></script>

Review the upgrading guide for a list of breaking changes.

Reporting bugs

Please report bugs and any other issues you encounter to support@honeybadger.io!

Honeybadger has your back when it counts.

We're the only error tracker that combines exception monitoring, uptime monitoring, and cron monitoring into a single, simple to use platform. Our mission: to tame production and make you a better, more productive developer.

Learn more
author photo

Joshua Wood

Josh is Honeybadger's resident bug hunter and technical debt collector. Once enthusiastically referred to as a "human exception tracker", he spends his days crafting the middleware, plugins, and gems which keep the 'badger fat and happy through a steady diet of fresh data.

More articles by Joshua Wood
“We've looked at a lot of error management systems. Honeybadger is head and shoulders above the rest and somehow gets better with every new release.” 
Michael Smith
Try Error Monitoring Free for 15 Days