Failed to save undefined: No COMPONENT named markup://svg found :

  • Followed the Trailhead tutorial and I still get the same error about svg.

    The code I am using is taken from the Lightning Design System. I created the supporting files as specified in the tutorial. Here is a snippet of the Component code (just note not all the code is included since it came directly from the LDS. The error is (Failed to save undefined: No COMPONENT named markup://svg found : [markup://michelleemanuel:forecastPlanComponent]: Source). Some of the other responses I saw said to read the tutorial - I have gone down that path and it did not work. I am not invoking this from a Visualforce page but from a Component.

    <table class="slds-table slds-table--bordered slds-max-medium-table--stacked-horizontal">

    select all Opportunity Name Sort ....

    I think you should check component names, may be there are some mismatch in name . also check the namespace as well. It will solve your problem.

    were you able to get the SVG tab working? if yes, could you please share the details?

    Okay, so I guess you have followed this link first and the issue is still persisting. SVG Icon Component Helper Would you please try replacing `` with `` in your component and check?

  • Starting Spring '17, the svgIcon component has been deprecated in favor of the lightning:icon component

        <lightning:icon iconName="action:approval" size="large" alternativeText="Indicates approval"/>

    This should be the accepted answer from Spring '17

  • You can't use the SVG tag directly with lightning components. You'll need to make a custom component for rendering SVGs. You can copy/paste this code from the Lightning Design System Site to make your own custom SVG component:

    You'll need to use that component instead of the SVG tag.

    Better to use the code from the Salesforce Lightning Design System site rather than Trailhead -- it's synched up with the GitHub repo, where Trailhead may not be:

    found the answer in the Lightning design system guide in that svg is not supported as defined as of now. I needed to create the svg component and then do the kludge to use it. It takes some guess work to determine the values for the attributes. I will do some more digging around the documentation to determine what works and what does not.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM