function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Subbu DavalaSubbu Davala 

error in challenge: create a lightning component.

Module
Lightning components -> Create a lightning component

I"m just using the same code they've given in trail head module.

Error:-
Step not yet complete... here's what's wrong:
The component does not contain the correct lightning:card markup.


code used: (provided in trailhead):
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
    <!-- Contact list goes here -->
    
    <lightning:datatable data="{! v.Contacts }" columns="{! v.Columns }" keyField="Id" hideCheckboxColumn="true"/>

    
</lightning:card>
SandhyaSandhya (Salesforce Developers) 
Hi,

Makue sure that you have saved your component and also provide the link of the trailhead challenge so that I can help you further.

Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 
Subbu DavalaSubbu Davala
Hi Sandhy,
Thanks for your reply.

PFB trailhead link for the module:-
https://trailhead.salesforce.com/projects/quickstart-lightning-components/steps/quickstart-lightning-components3

Yes , the component is saved. i could see the component in my record page. it's working successfully.

but still, i'm facing the same issue.

i could not attach screenshot, becoz i'm getting some error while trying to take screenshot.
SandhyaSandhya (Salesforce Developers) 
Hi,

Open your component and make sure that it has the same code as below which worked for me.If this does not work I would suggest you try in new trailhead playground as there may be some pre existing configuration that is preventing you from checking challenge.
<aura:component controller="MyContactListController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="Account" type="Account" />
<aura:attribute name="Contacts" type="Contact" />
<aura:attribute name="Columns" type="List" />
<force:recordData aura:id="accountRecord"
                  recordId="{!v.recordId}"
                  targetFields="{!v.Account}"
                  layoutType="FULL"
                  />
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
    <!-- Contact list goes here -->
</lightning:card>

Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya