"'Promise' is undefined" in IE11
See original GitHub issueI’m testing the pnp.js of the latest PnP-JS-Core, using an Install and Use example
The example includes the use of promise. The instructions say that this will fail in IE11 unless I add the es6-promise polyfill and the fetch polyfill and include them in the example.
So I did, but in IE11, when invoking the invocation of “then”:
$pnp.sp.web.select("Title").get()
.then(function (data) {
document.getElementById("main").innerText = 'Web title: ' + data.Title;
})
.catch(function (ex) {
document.getElementById("main").innerText = 'Exception: ' + ex;
});
still fails with the exception: “‘Promise’ is undefined”.
Any suggestions why that might be?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top 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 ...
Read more >'Promise' is undefined in Internet Explorer (IE 11) - Syncfusion
We suspect that you haven't referred the ES6 Promise polyfill script in your html page which cause this issue in IE11 browser.
Read more >"'Promise' is undefined" error in IE11 even though targeting ES5
An interesting counter-example to Promise not working, BTW, is that Symbol does seem to get polyfilled (at least, I get no error in...
Read more >IE11 Dialog Promise Undefined - The Aurelia Discourse
I'm in the process of updating an existing app using (Aurelia Framework 1.1.4) to the latest version of Aurelia.
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems I maybe do not have the latest version here, “catch” needs to be a quoted property:
Promise.prototype['catch'] = ...
Looks like this was an IE Compatibility issue. The minified or the es6-promises actually does have the [“catch”] and [“finally”] values defined correctly.