question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

script js doesn't load all scripts

See original GitHub issue

I have an array of scripts that load together (order is insignificant) and script js fails to load them. For example test4 and test 7 don’t load, making the app not to bootstrap at all. This happens at random times in chrome and every time i open an incognito window and try the url

   $script.ready('dependencies', function () {

    console.info("loaded dependencies");

    $script([
            'Libs/test1',
            'Libs/test2',
            'Libs/test3',
            'Libs/test4',
            'Libs/test5',
            'Libs/test6',
            'Libs/Subfolder/test7'
    ], function () {

        console.info("bootstraping app");
        angular.bootstrap(document, ['nlgApp']);
    });

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
amoreycommented, Aug 6, 2015

I believe that script.js doesn’t handle error callbacks because they’re not supported in older browsers (LTE IE8). Here’s the relevant code: https://github.com/ded/script.js/blob/master/src/script.js#L65-L77

In case it helps, I wrote a script.js-compatible library that handles error callbacks but it only works in modern browsers (IE9+): https://github.com/muicss/loadjs

0reactions
boyecommented, Dec 14, 2016

Ah, i didn’t noticed the date of this issue 😂 that figures

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why won't my JS file load? - Stack Overflow
Looks like the problem is with your file. Make sure the file .../scripts/hovermenus.js exists. Navigate there and copy paste the file name from...
Read more >
Loading Script Files Dynamically - KIRUPA
Don't load all of your (and your family's) external JS files on page load. Learn how to load them on-demand!
Read more >
Scripts: async, defer - The Modern JavaScript Tutorial
The async attribute means that a script is completely independent: The browser doesn't block on async scripts (like defer ). Other scripts don't ......
Read more >
Javascript Loading and Execution - Medium
For IE, this tag will cause IE to download the js file in parallel, and hold it to the entire DOM load (DOMContentLoaded)....
Read more >
All about <script> - Level Up Coding
If you have code in your JavaScript that alters HTML as soon as the JavaScript code loads, there won't actually be any HTML...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found