{"record":{"id":"1f8658f80af617d5","repo":"feathericons/feather","slug":"no-icon-matching-name-see-the-complete-list","errorCode":null,"errorMessage":"No icon matching '${name}'. See the complete list of icons at https://feathericons.com","messagePattern":"No icon matching '(.+?)'\\. See the complete list of icons at https://feathericons\\.com","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/to-svg.js","lineNumber":20,"sourceCode":"\n/**\n * Create an SVG string.\n * @deprecated\n * @param {string} name\n * @param {Object} attrs\n * @returns {string}\n */\nfunction toSvg(name, attrs = {}) {\n  console.warn(\n    'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.',\n  );\n\n  if (!name) {\n    throw new Error('The required `key` (icon name) parameter is missing.');\n  }\n\n  if (!icons[name]) {\n    throw new Error(\n      `No icon matching '${name}'. See the complete list of icons at https://feathericons.com`,\n    );\n  }\n\n  return icons[name].toSvg(attrs);\n}\n\nexport default toSvg;\n","sourceCodeStart":2,"sourceCodeEnd":29,"githubUrl":"https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/to-svg.js#L2-L29","documentation":"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').","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use an exact, lower-case kebab-case name from https://feathericons.com, e.g. feather.icons['arrow-right'].toSvg().","Guard with a check: if (feather.icons[name]) before rendering.","Log Object.keys(feather.icons) to see valid names in your installed version.","Upgrade feather-icons if the icon exists only in newer releases."],"exampleFix":"// before\nfeather.toSvg('ArrowRight'); // throws\n\n// after\nfeather.toSvg('arrow-right');","handlingStrategy":"validation","validationCode":"const name = 'arrow-right';\nif (!(name in feather.icons)) throw new Error(`Unknown feather icon: ${name}`);","typeGuard":"const isFeatherIcon = (name: string): name is keyof typeof feather.icons => name in feather.icons;","tryCatchPattern":"try {\n  return feather.icons[name].toSvg(attrs);\n} catch (e) {\n  if (e.message.startsWith(\"No icon matching\")) {\n    console.warn(`Unknown icon '${name}', using fallback`);\n    return feather.icons['circle'].toSvg(attrs);\n  }\n  throw e;\n}","preventionTips":["Always use lower-case kebab-case names from feathericons.com","Guard lookups with `name in feather.icons` before rendering","Log Object.keys(feather.icons) to verify names for your installed version","Keep feather-icons updated and pin icon names in a whitelist"],"tags":["icon-name","lookup-failure","invalid-argument"],"backgroundTag":"unknown-icon-name","analyzedSha":"3dc050d97405062eba78aa57115c0a15c63abdaa","analyzedAt":"2026-08-30T12:01:49.665Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}