import labelname from '@salesforce/label/myNamespace.labelName';


I was unable to deploy the above statement, Explicit use of namespace "myNamespace" in file "scheduleConfig.js" is prohibited. Use default namespace "c" instead.

when I tried, without namespace this is working fine, but I want to access using namespace

  • 1
    Do you have a different namespace, why do you want to use a namespace? – RedDevil May 15 '19 at 9:47
  • LWC has strong validation for use of namespace, this is one of the instances. 'c.labelName' is recommended. – Raul May 15 '19 at 9:50
  • if i used c.labelName, able to deploy but at componnet, this is showing error as it does not exist – Vanaja Kasaragadda May 15 '19 at 10:21
  • I am using namespace as we are doing managed package in org – Vanaja Kasaragadda May 15 '19 at 10:22
  • It should not matter with your managed package namespace and you should be able to import and use the reference with 'c' namespace import labelXYZ from '@salesforce/label/c.labelXYZ'; – Anshul Agrawal May 20 '19 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.