Lightning Component Bundles sometimes left in "out-of-sync" states if modifying events

Issue #561 resolved
Alex Jung created an issue

I have some components that registered and use Lightning events. I recently refactored the event names (trying to standardize on a naming convention) and updated all references to the old names in the code (essentially find "old" event names & replace with "new" event names").

After saving all the updated files, I attempted to delete the "old" lightning events, by right-clicking in project explorer on the old Event "bundles".

Upon deleting, I got errors like the following:

ERROR deleting AuraDefinitionBundle aura/DataTablePageChangeEvent: This lightning component bundle is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Lightning Component Bundle "c:CertifiedHomesReports" - COMPONENT - 0Adt0000000PBeD. This lightning component bundle is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Lightning Component Bundle "c:ResidentialServiceAreaRelatedList" - COMPONENT - 0Adt0000000PBej. This lightning component bundle is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Lightning Component Bundle "c:ResidentialServiceAreaRelatedList" - DESIGN - 0Adt0000000PBen. This lightning component bundle is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Lightning Component Bundle "c:Certifi

Deleting from Developer Console also returned identical errors. No references to the old event names appear to exist in a global search of my local repo. However, it referenced "design" files that i didn't send to the SF org in the errors message, so...

That appears to be the "workaround" (not 100% sure :)...). It appears that sending/deploying the entire component bundle directory of the files updated to Salesforce (by single-clicking in project explorer on the bundle directory and pressing cmd-s [mac]) "fixes" the issue, since it then allowed me to delete the old events in a subsequent action. This is true even though the local design file has no reference to the events (of course, i don't know what SF does to that file after I push it up...)

Comments (3)

  1. Scott Wells repo owner

    Interesting. I'll check with Salesforce on this one since it's reproducible outside of IC. Thanks for the report!

  2. Scott Wells repo owner

    I've not heard anything from Salesforce on this. I'm resolving the issue here since it's reproducible in Developer Console. I'll let you know if I do hear anything useful from Salesforce on the topic, though.

  3. Benjamin Luehrs

    I recently had same issue that couldn’t delete child Aura Components that used to be referenced in other components but were no longer. Was getting weird errors that were referenced in controller, helper, and design files, even though was only ever referenced in component files. “Deploy All Metadata” through Illuminated Cloud fixed the issue and allowed me to delete the no-longer-used Aura Components.

  4. Log in to comment