• Jeremy Benetz 8
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am using the Lodash and Moment javascript libraries, imported as static resources, in several lighting components. Most of the time they work great, but every so often I get an error like this in the UI: 

Action failed: ltng:require$controller$init [ltng:require encountered an existing <script> element for /resource/SDS_LODASH_JS that was not created by an ltng:require instance. Unable to determine when the script would complete loading!]

I'm currently loading these libraries with the following tag: 
<ltng:require scripts="{!join(',',
                          $Resource.SDS_Moment_JS,
                          $Resource.SDS_LODASH_JS)}"
                  afterScriptsLoaded="{!c.doInit}"/>

Has anyone else had this problem and figured out how to resolve it?
 
I am using the Lodash and Moment javascript libraries, imported as static resources, in several lighting components. Most of the time they work great, but every so often I get an error like this in the UI: 

Action failed: ltng:require$controller$init [ltng:require encountered an existing <script> element for /resource/SDS_LODASH_JS that was not created by an ltng:require instance. Unable to determine when the script would complete loading!]

I'm currently loading these libraries with the following tag: 
<ltng:require scripts="{!join(',',
                          $Resource.SDS_Moment_JS,
                          $Resource.SDS_LODASH_JS)}"
                  afterScriptsLoaded="{!c.doInit}"/>

Has anyone else had this problem and figured out how to resolve it?