feathericons/feather · error · Error

No icon matching '${name}'. See the complete list of icons a

Error message

No icon matching '${name}'. See the complete list of icons at https://feathericons.com

What it means

The icon name passed to feather.toSvg(name, attrs) is truthy but does not exist in the feather icons registry, so `icons[name]` is undefined. The library throws with a lookup-failure message pointing to https://feathericons.com for the full list of valid names. Note the exception lists icons only by name — names are lower-case kebab-case (e.g. 'activity', 'arrow-right').

Source

Thrown at src/to-svg.js:20

/**
 * Create an SVG string.
 * @deprecated
 * @param {string} name
 * @param {Object} attrs
 * @returns {string}
 */
function toSvg(name, attrs = {}) {
  console.warn(
    'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.',
  );

  if (!name) {
    throw new Error('The required `key` (icon name) parameter is missing.');
  }

  if (!icons[name]) {
    throw new Error(
      `No icon matching '${name}'. See the complete list of icons at https://feathericons.com`,
    );
  }

  return icons[name].toSvg(attrs);
}

export default toSvg;

View on GitHub (pinned to 3dc050d974)

Solutions

  1. Use an exact, lower-case kebab-case name from https://feathericons.com, e.g. feather.icons['arrow-right'].toSvg().
  2. Guard with a check: if (feather.icons[name]) before rendering.
  3. Log Object.keys(feather.icons) to see valid names in your installed version.
  4. Upgrade feather-icons if the icon exists only in newer releases.

Example fix

// before
feather.toSvg('ArrowRight'); // throws

// after
feather.toSvg('arrow-right');
Defensive patterns

Strategy: validation

Validate before calling

const name = 'arrow-right';
if (!(name in feather.icons)) throw new Error(`Unknown feather icon: ${name}`);

Type guard

const isFeatherIcon = (name: string): name is keyof typeof feather.icons => name in feather.icons;

Try / catch

try {
  return feather.icons[name].toSvg(attrs);
} catch (e) {
  if (e.message.startsWith("No icon matching")) {
    console.warn(`Unknown icon '${name}', using fallback`);
    return feather.icons['circle'].toSvg(attrs);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling feather.toSvg('ArrowRight') (wrong casing), feather.toSvg('arrow right') (wrong separator), a typo like 'feathr', or a name from another icon set (e.g. FontAwesome names) — anything where icons[name] is undefined.

Common situations: Icon names stored in a database/CMS that don't match feather's kebab-case names; migrating from another icon library; using an icon added in a newer feather-icons version than the installed one.

Related errors


AI-assisted analysis of feathericons/feather@3dc050d974 (2026-08-30). Data as JSON: /api/errors/1f8658f80af617d5. Report an issue: GitHub.