caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
621 stars 154 forks source link

Uncaught ReferenceError: regeneratorRuntime is not defined #94

Closed adnanmasd closed 6 years ago

adnanmasd commented 6 years ago

I am using async/await in my vue app When I run my app on browser, it gives me the this error and a blank page

Uncaught ReferenceError: regeneratorRuntime is not defined
    at eval (checkout.vue?./node_modules/babel-loader/lib?{"presets":["env"],"plugins":["transform-object-rest-spread"]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0:154)
    at eval (checkout.vue?./node_modules/babel-loader/lib?{"presets":["env"],"plugins":["transform-object-rest-spread"]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0:262)
    at Object../node_modules/babel-loader/lib/index.js?{"presets":["env"],"plugins":["transform-object-rest-spread"]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/assets/vue/pages/checkout.vue (ecdc800cf1d306b950fb.main.js:1102)
    at __webpack_require__ (ecdc800cf1d306b950fb.main.js:679)
    at fn (ecdc800cf1d306b950fb.main.js:89)
    at eval (checkout.vue:4)
    at Object../src/assets/vue/pages/checkout.vue (ecdc800cf1d306b950fb.main.js:3928)
    at __webpack_require__ (ecdc800cf1d306b950fb.main.js:679)
    at fn (ecdc800cf1d306b950fb.main.js:89)
    at eval (routes.js:8)
caiobiodere commented 6 years ago

hey, @adnanmasd I found your situation here:

babel-polyfill is required. You must also install it in order to get async/await working. npm install -- save babel-polyfill

Then in your main.js just import it: import babelPolyfill from 'babel-polyfill'

Reference: https://stackoverflow.com/questions/33527653/babel-6-regeneratorruntime-is-not-defined

caiobiodere commented 6 years ago

@adnanmasd How was it?

adnanmasd commented 6 years ago

@caiobiodere, the application build successfully without any errors. Thanks

web-2017 commented 4 years ago

its work for me, thanks

zainkhalid93 commented 3 years ago

It works...

Greathyx commented 3 years ago

It works for me. Thanks!

coordproyectosticsocbp commented 3 years ago

Works Fine for me. Thanks So Much!

RayendraSabandar commented 3 years ago

Works instantly. Thanks a lot