+ Start a Discussion
Mohau TwalaMohau Twala 

Failed to save AccountSearch.cmp: No EVENT named markup://c:AccountsLoaded found : [markup://c:AccountSearch]: Source

HI I an getting this error : Failed to save AccountSearch.cmp: No EVENT named markup://c:AccountsLoaded found : [markup://c:AccountSearch]: Source when trying to save this code below:
<aura:component controller="AccountSearchController">
    <aura:registerEvent name="accountsLoaded" type="c:AccountsLoaded"/>
    <aura:handler name="init" value="{!this}" action="{!c.onInit}"/>
    <aura:attribute name="searchTerm" type="String" default="San Francisco"/>
    <lightning:card title="Account Search" iconName="standard:search">
        <div class="slds-form slds-p-around_x-small">
            <lightning:input
                label="Search"
                variant="label-hidden"
                value="{!v.searchTerm}"
                placeholder="Search by name, phone, website, or address"
                onchange="{!c.onSearchTermChange}"/>
        </div>
    </lightning:card>
</aura:component>
Dinesh GopalakrishnanDinesh Gopalakrishnan
Hi Mohau,

Please make sure that you created a component or application event called "AccountsLoaded.evt"  in your sandbox before saving the lightning component.

<aura:event TYPE='.....'>
.....
</aura:event>

Kindly Mark this as a Best Answer if you Find this Useful!

Thanks,
DineshKumar Gopalakrishnan