I am trying to deploy an Aura component, which is a wrapper for a LWC, using Visual Studio, but I am unable to.

Visual Studio tells me:

14:31:10.125 Starting SFDX: Deploy Source to Org
=== Deploy Errors
14:31:11.229 ended SFDX: Deploy Source to Org

So not very helpful. The implementation status in Salesforce itself gives a bit more detail:

UNKNOWN_EXCEPTION: Unable to handle Aura Definition 'TradeWindowWrapperV20210726/TradeWindowWrapperControllerV20210726.js': deftype not supported

The cmp file looks like this:

<aura:component implements="flexipage:availableForAllPageTypes,force:hasSObjectName,force:hasRecordId,force:lightningQuickActionWithoutHeader">    
    <aura:html tag="style">
        .slds-modal__container {
            width: 99%;
            max-width: 99%;
    <c:tradeWindowV20210726 recordId="{!v.recordId}" onclose="{!c.modalClose}"/>

and the js file looks like this:

  modalClose : function(component, event) {
    const urlToNavigateTo = event.getParam('navigateToURL');
    if (urlToNavigateTo) {
      var urlEvent = $A.get("e.force:navigateToURL");
        "url": urlToNavigateTo

The LWC itself exists, I have checked that in Salesforce.

This Aura component is a clone of another Aura component, which I have deployed successfully. The only difference is the reference to the LWC component.

  • P.S. There is no LWC here. It's confusing naming, but LWC is a completely different type of component from Aura.
    – sfdcfox
    Jul 26 at 12:58
  • The LWC is named tradeWindowV20210726, referenced to in the cmp file. The wrapper is necessary to start the LWC using an action. I have given the LWC and its Aura wrapper similar names. Jul 26 at 13:00
  • I meant only that the actual problem was Aura related, not LWC related. 😁
    – sfdcfox
    Jul 26 at 13:04
  • I have removed the LWC tag. Jul 26 at 13:05

The file name for the Aura Component's Controller is wrong. TradeWindowWrapperV20210726/TradeWindowWrapperControllerV20210726.js should be TradeWindowWrapperV20210726/TradeWindowWrapperV20210726Controller.js. The controller for an Aura component must named ComponentNameController.js.

  • Once again, @sfdcfox saves the day! Jul 26 at 12:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.