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.

Promise is undefined

See original GitHub issue

Hi, I get “Promise is undefined” error from sweetalert2.min.js.

 $.ajax({
        type: 'GET',
        url: url,
        data: {
            test: test
        },
        error: function (xhr, status, error) {
            swal('Sorry...!', 'Server Message: <br><br>' + error, 'error');
            // Throw expection "Promise is undefined"
        }
    }).done(function (data) {

    });

Thanks…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
samturrellcommented, Aug 8, 2017

<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>

7reactions
limontecommented, Aug 8, 2017

Most probably you’re getting this exception in IE.

For IE support Promise polyfill should be included beside sweetalert2.js:

<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Error Promise is undefined in IE11 - Stack Overflow
I am converting React code to typescript, target in tsconfig is es5. on running in IE 11 i get an error "Promise is...
Read more >
'Promise' is undefined in IE11 WordPress
I have used this plugin to create popups in the Divi website I have built: https://wordpress.org/plugins/popups-for-divi/. The popups were not opening in IE ......
Read more >
"'Promise' is undefined" error in IE11 even though targeting ES5
Fails in IE 11 with error SCRIPT5009: 'Promise' is undefined . Only works in IE 11 if bluebird.min.js script element is uncommented.
Read more >
Resolving the JavaScript Promise Error "TypeError: Cannot ...
TypeError: Cannot read property 'then' of undefined. In this guide, we will cover two code examples containing a bugs that cause this TypeError ......
Read more >
JavaScript runtime error: 'Promise' is undefined in IE
While using IE11 it return JavaScript runtime error: 'Promise' is undefined in webdatarocks.js file. Please suggest resolve this issue.
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