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
VS0184VS0184 

Lightning:card markup Error

For challenge "Create a Lightning Component", I am getting the error listed below. I was able to get through all of the other modules except this one. What am I missing? 

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

User-added image

MyContactList.cmp
<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:datatable data="{! v.Contacts }" columns="{! v.Columns }" hideCheckboxColumn="true"/> 

</lightning:card>

    <aura:handler name="init" value="{!this}" action="{!c.myAction}" />
</aura:component>
MyContactListControllers.js
({
	myAction : function(component, event, helper) {
		component.set("v.Columns", [
    {label:"First Name", fieldName:"FirstName", type:"text"},
    {label:"Last Name", fieldName:"LastName", type:"text"},
    {label:"Phone", fieldName:"Phone", type:"phone"}
]);
        var action = component.get("c.getContacts");
action.setParams({
    recordId: component.get("v.recordId")
});
action.setCallback(this, function(data) {
    component.set("v.Contacts", data.getReturnValue());
});
$A.enqueueAction(action);

	}
})

Thanks in advance!
Elena LitvinovaElena Litvinova
Hi Synthia, 
have you  solved the issue? I have same one, would like to know how could it be fixed.
Thanks!
Anderson Cardoso 10Anderson Cardoso 10
You might be able to pass the challenge if you delete lightning:datatable line (line 15 in your MyContactList.cmp).