You need to sign in to do that
Don't have an account?
Ravi_SFDC
LWC Issue
I am getting the below error when i am trying to deploy the code from locale tot he scratch org
This error comes when i created a custom label in the Lightning Web Component.
Labels should have a section and a name: ProgramOverview
This error comes when i created a custom label in the Lightning Web Component.
Labels should have a section and a name: ProgramOverview
To import Custom Labels we use @salesforce/label scope module in Lightning Web Components
import labelName from '@salesforce/label/labelReference';
labelName ---> it is a name that refers to the label.
labelReference ---> The name of the label in your org in the format namespace.labelName
Note:
if you don't have any namespace in your org use default namespace c
Ex: c.labelReference
You can take idea for following Example: I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Thank you, I found the solution.
What is the solution?? I'm facing the same issue now.
I am not able to recollect, but can you provide the details of your issue along with the error screen shot that you are facing. So that i can check and tell you.
For example - Notice the namespace - c in the import statement, if you dont use it, you will get an error - Labels should have a section and a name: