function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DixitSDixitS 

An internal server error has occurred Error ID: 1918711477-34806 (-1091817309) (issuePrevent Creation of Function Expressions When Using $A.createComponent() or $A.createComponents() )

Code is working fine in dev org and it is getting internal server Error in another Org. Code is absolutely same in both of the org. Below is the code of VF page, as I am able to recognise in console, the code is not executing after line 16. Not sure, if this is causing any issuePrevent Creation of Function Expressions When Using $A.createComponent() or $A.createComponents() in Aura Components.  Does anyone aware of this kind of error? Thanks in advance 
<apex:page standardController="Campaign_Request_Task__c" recordSetVar="selectedTasks" extensions="PT_CloneCampaignReqTasksController">
    <apex:includeLightning />
    <head>
    <apex:slds />
    </head>
    
    <div style="padding-top: 90px; padding-bottom: 120px;padding-left:10%;padding-right:10%;background-color:#f4f6f9">  
    <div class="slds-modal__container slds-theme_default" style = "padding-top:32px;padding-right:8px;padding-left:8px;background-color:white" id="page" >   
        
    </div> 
   </div>
    <script>
    var selectedTaskRecordIds = "{!taskIds}";
    var campaignReqId = "{!campaignReqId}";
    console.log("selectedTaskRecordIds",selectedTaskRecordIds);
    console.log("campaignReq",campaignReqId);
    
    $Lightning.use("c:PT_CloneCampaignRequestTasksApp", function() {
        $Lightning.createComponent(
            "c:PT_CloneCampaignRequestTasks",
            {"selectedTaskRecordIds": selectedTaskRecordIds,
             "baseCmpReqId":campaignReqId},
            "page",
            function(cmp) {
                console.log("Component is created!");
                console.log(cmp);
            });
        
    });
    
    </script>  
    
</apex:page>

User-added image
AnudeepAnudeep (Salesforce Developers) 
The underlying error is Dependent class is invalid and needs recompilation:

Can you please try recompiling the class and let me know if it fixes the issue. If it doesn't, please raise a case with support and provide the gack error