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


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

Read More: