【问题标题】:React OIDC-Client IE Promise is UndefinedReact OIDC-Client IE Promise 未定义
【发布时间】:2019-09-15 01:40:12
【问题描述】:

我在 IE 11 上收到“'Promise' is undefined”错误,Chrome 和 Firefox 没有给出此错误。

我正在为 OIDC 客户端使用以下包,我也已经向该作者提交了一个问题。 https://github.com/IdentityModel/oidc-client-js/issues/826

如果我点击链接 SCRIPT5009,我会被定向到 https://docs.microsoft.com/en-us/scripting/javascript/misc/undefined-identifier

我安装了下面两个,问题依旧 https://www.npmjs.com/package/babel-polyfill https://www.npmjs.com/package/promise-polyfill

另外,我在 StackOverflow 和网络上阅读了一些文章,这些文章承诺错误来自使用箭头函数和具有 ES6 代码,但这个问题出现在 OIDC 包中,因此应用程序中没有任何代码给出此错误。

【问题讨论】:

    标签: javascript reactjs internet-explorer openid-connect oidc-client-js


    【解决方案1】:

    尝试安装es6-promise polyfill,你可以参考这个帖子:Getting Error Promise is undefined in IE11

    【讨论】:

    • 上面的包可以工作,但如果你有一个 babel polyfill,它应该会自动解决这个问题。
    猜你喜欢
    • 1970-01-01
    • 2022-01-05
    • 2016-05-16
    • 2017-07-19
    • 2018-05-20
    • 1970-01-01
    • 2022-12-24
    • 2016-10-30
    • 2016-03-20
    相关资源
    最近更新 更多