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

@nexusdi/errors

v0.4.0-rc.1

Published

Debug your dependency graph instantly with actionable, human-readable diagnostics.

Readme

@nexusdi/errors

npm license

Debug your dependency graph instantly with actionable, human-readable diagnostics.

When a NexusDI container fails to start, you usually see a short error code. While efficient for machines, these codes are cryptic to developers and leave you guessing why a dependency is missing or where a binding failed.

@nexusdi/errors transforms these codes into detailed explanations. It analyzes your module graph to tell you exactly what went wrong and provides a specific "Fix" line to resolve the issue.

Key Features

The plugin provides diagnostic intelligence for complex wiring scenarios.

  • Detailed Explanations: Replaces short codes with full sentences describing the failure.
  • Actionable Fixes: Includes a Fix: line directing you to the specific export or import needed.
  • Near-Miss Analysis: Identifies tokens provided in other modules that were not exported.
  • Manual Diagnosis: The explain(error) function converts caught errors into readable text.
  • Technical Spec: ESM-only; requires @nexusdi/core (matching version).

Installation

0.4 is a release candidate on the npm next tag. Install every @nexusdi package from next so their versions match. Without @next, npm installs core 0.3 and stops with a peer conflict.

npm install @nexusdi/errors@next @nexusdi/core@next

Quick Example

The following example compares the standard core error message with the enriched output provided by the errors() plugin.

import { Nexus, Token, defineModule, provide } from '@nexusdi/core';
import { errors } from '@nexusdi/errors';

interface INavCharts {
  plot(to: string): string;
}
class StarCharts implements INavCharts {
  plot = (to: string) => `course to ${to}`;
}
const NAV_CHARTS = new Token<INavCharts>('NavCharts');
class Helm {
  static deps = [NAV_CHARTS] as const;
  constructor(readonly charts: INavCharts) {}
}

const Tactical = defineModule({
  name: 'Tactical',
  providers: [provide(NAV_CHARTS, { useClass: StarCharts })],
});
const Bridge = defineModule({ name: 'Bridge', providers: [Helm] });
const App = defineModule({ name: 'App', imports: [Bridge, Tactical] });

const plugins = [errors()];
const fail = (error: { errors: Error[] }) => error.errors[0]?.message ?? '';
const before = await Nexus.create(App).then(() => '', fail);
const result = await Nexus.create(App, { plugins }).then(() => '', fail);
before.split(' ').slice(1, 4).join(' '); // -> 'token=NavCharts requester=Helm module=Bridge.'
result.split('\n').slice(1); // -> ['  NavCharts is provided in Tactical, which does not export it.', "  Fix: add NavCharts to Tactical's exports and import Tactical into Bridge."]

Documentation

License

MIT