ReferenceError: “Promise” is not defined””
IE does not support promise solutions
//import
<script src = "https://cdn.polyfill.io/v2/polyfill.min.js"> </script>
//or
<script type="text/javascript" src ="https://cdn.polyfill.io/v2/polyfill.min.js?features=es6"></script>
Promise does not support iE
VUE project
(1) cnpm install –save babel-polyfill
(2) Add code require(“babel-polyfill”) in webpack.base.conf.js
(3) Add the code import “babel-polyfill” in main.js;
React project
(1) cnpm install –save babel-polyfill
(2) Add the code import “babel-polyfill” in the entry file (app.js/router.js);
Read More:
- [Solved] Uncaught ReferenceError: is not defined at HTMLAnchorElement.onclick
- [Solved] Uncaught ReferenceError: FileAsyncWriter is not defined
- errorThrown:ReferenceError: data is not defined [How to Solve]
- [Solved] Electron Error: ReferenceError: require is not defined
- [Solved] Eval Error: Uncaught ReferenceError: False is not defined
- How to Solve jQuery error: Uncaught ReferenceError: $ is not defined
- [Solved] Parcel Service Error: regeneratorRuntime is not defined
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- <script setup> Error: ‘defineProps‘ is not defined [How to Solve]
- cloud.callFunction:fail Error:wx is not defined [How to Solve]
- VUE: Property or method “deleteFun“ is not defined on the instance but referenced during render. [How to Fix]
- [Solved] emcc error: error: LLVM_ROOT is not defined
- Cordova – CordovaError: Promise rejected with non-error: ‘ios-deploy was not found
- Abnormal [System.InvalidOperationException: custom type mapping for ‘xxx’ is not specified or is not a solution
- AUC Error – ValueError: Data is not binary and pos_label is not specified
- [Solved] Vue Error: Failed to mount component: template or render function not defined
- Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to
- [Solved] This is probably not a problem with npm. There is likely additional logging output above.
- [Solved] pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
- [Uniapp] Solve the error plus not defined when pushing