Lightning Message Service in non-Salesforce DX environment

Issue #1574 resolved
Cary Freeman created an issue

In a non-Salesforce DX project, I created a directory called “messageChannels” and a file called “TransactionManagement.messageChannel-meta.xml” in that directory. In the Project view, trying to expand the “messageChannels” directory does not display the file. Illuminated Cloud does say that the file was successfully deployed to my sandbox when I try to deploy it, but when I try to deploy an LWC that references it, the error is: org.auraframework.throwable.AuraRuntimeException: Unable to retrieve metadata for descriptor: markup://c:__LightningMessageChannel__TransactionManagement__c.

Comments (6)

  1. Scott Wells repo owner

    Cary, the issue is that in a metadata format project, all meta.xml files are considered companions for some other source file, e.g., *.cls, and by default are hidden. If you click Illuminated Cloud>Show meta.xml files, that should show the file, though it will show all of the other ones as well.

    I'm a bit confused, though. I would expect that file to be named TransactionManagement.messageChannel in a metadata format project and only have the -meta.xml extension in a source format project. Is this some inconsistency in metadata format projects that was recently introduced, or is the file perhaps named incorrectly for the project format?

  2. Cary Freeman reporter

    Scott, thank you for the explanation. You are completely correct and all problems went away when the file was renamed using the extension .messageChannel.

  3. Log in to comment