Foundry376/Mailspring · error

Ignoring component trying to register with old CommandRegist

Error message

Ignoring component trying to register with old CommandRegistry.register syntax

What it means

Legacy-API warning in ComponentRegistry.register: a package called register with the old CommandRegistry-style argument signature (deprecated since Mailspring 1.x). The registration is ignored — the component never appears — and the console message tells the developer to migrate to the current options-object API.

Source

Thrown at app/src/registries/component-registry.ts:61

  //   * `role`: (optional) {String} If you want to display your component in a location
  //      desigated by a role, pass the role identifier.
  //
  //   * `modes`: (optional) {Array} If your component should only be displayed
  //      in particular Workspace Modes, pass an array of supported modes.
  //      ('list', 'split', etc.)
  //
  //   * `location`: (optional) {Object} If your component should be displayed in a
  //      column or toolbar, pass the fully qualified location object, such as:
  //      `WorkspaceStore.Location.ThreadList`
  //
  //   Note that for advanced use cases, you can also pass (`modes`, `roles`, `locations`)
  //   with arrays instead of single values.
  //
  // This method is chainable.
  //
  register(component, options: ComponentRegistryDescriptor) {
    if (component.view) {
      return console.warn(
        'Ignoring component trying to register with old CommandRegistry.register syntax'
      );
    }

    if (!options) {
      throw new Error(
        'ComponentRegistry.register() requires `options` that describe the component'
      );
    }
    if (!component) {
      throw new Error('ComponentRegistry.register() requires `component`, a React component');
    }
    if (!component.displayName) {
      throw new Error(
        'ComponentRegistry.register() requires that your React Component defines a `displayName`'
      );
    }

View on GitHub (pinned to 648c685d60)

Solutions

  1. Update the package to call ComponentRegistry.register with a single options object ({location, modes, role, ...})
  2. If the package is unmaintained, fork or patch it to use the current registry API
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at app/src/registries/component-registry.ts:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Foundry376/Mailspring@648c685d60 (2026-09-03). Data as JSON: /api/errors/b8a859a53a3d4ba8. Report an issue: GitHub.