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
Nethra RaghupathyNethra Raghupathy 

Internal server error while using lightning in visualforce page

Hi,

I created a managed package which is calling lightning component from visualforce page. It shows internal server error on load of the managed package. But it works fine in classic account where I created the page.
<apex:page sidebar="false" showheader="false">
    <apex:includeLightning />   
    <div id="userContainer" style="height:100%"/>

    <script>
$Lightning.use("c:ClassicApp", function() {
    $Lightning.createComponent("c:FIRST",
 {
 
 },
 "userContainer",
 function(cmp) {
     });
});
</script>
    
    
</apex:page>
What might be the error?
 
Raj VakatiRaj Vakati
Use this code .. It may becasue of the namespace 

 
<apex:page sidebar="false" showheader="false">
    <apex:includeLightning />   
    <div id="userContainer" style="height:100%"/>

    <script>
$Lightning.use("YOURNAMSPCE:ClassicApp", function() {
    $Lightning.createComponent("YOURNAMSPCE::FIRST",
 {
 
 },
 "userContainer",
 function(cmp) {
     });
});
</script>
    
    
</apex:page>