Error in created hook: “referenceerror:” promise “undefined” Vue cli project Google is right, ie reported an error, “promise” undefined“

resolvent:

1. First, download and install “Babel Polyfill” dependency: NPM install — save Babel Polyfill

2. Project main.js Import ‘Babel Polyfill’

Error Description: both chrome and FF are good at keeping “ie” data out

Error analysis: the IE kernel reports an error. First, locate the browser compatibility problem, and then read the error: error in created hook: “reference error:” promise “is not defined”. That is to say, promise callback is not supported. Promise is a feature of ES6. That is to say, the IE kernel version is not friendly to ES6 compatibility, and it needs to be degraded to be resolved. As for “Babel Polyfill” You can see the explanation on the official website

https://babeljs.io/docs/en/6.26.3/babel-polyfill


Read More: