SyliusCmsPlugin icon indicating copy to clipboard operation
SyliusCmsPlugin copied to clipboard

Uncaught ReferenceError: regeneratorRuntime is not defined

Open fred-dedi opened this issue 2 years ago • 1 comments

Hi,

I am using your webpack config file in v3.2.2, as described here : https://github.com/BitBagCommerce/SyliusCmsPlugin/blob/v3.2.2/doc/01.1-webpack-config.md

I have the following error on all admin pages :

Uncaught ReferenceError: regeneratorRuntime is not defined
   at bitbag-page-slug.js:9:1
   at bitbag-page-slug.js:9:1
   at ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js (bitbag-page-slug.js:9:1)
   at __webpack_require__ (bootstrap:19:1)
   at ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/bitbag/index.js (index.js:1:1)
   at __webpack_require__ (bootstrap:19:1)
   at ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/index.js (index.js:3:1)
   at __webpack_require__ (bootstrap:19:1)
   at ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/entry.js (entry.js:1:1)
   at __webpack_require__ (bootstrap:19:1)
(anonymes) @ bitbag-page-slug.js:9
(anonymes) @ bitbag-page-slug.js:9
./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/bitbag/bitbag-page-slug.js @ bitbag-page-slug.js:9
__webpack_require__ @ bootstrap:19
./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/bitbag/index.js @ index.js:1
__webpack_require__ @ bootstrap:19
./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/index.js @ index.js:3
__webpack_require__ @ bootstrap:19
./vendor/bitbag/cms-plugin/src/Resources/assets/admin/entry.js @ entry.js:1
__webpack_require__ @ bootstrap:19
(anonymes) @ bootstrap:83
(anonymes) @ bootstrap:83

Maybe i am missing something, but it seems you need to add a babel plugin in your webpack configuration, as babel/polyfill is not working anymore since babel 7 :

.configureBabel((config) => {
    config.plugins.push('@babel/plugin-transform-runtime');
})

Thanks

fred-dedi avatar Jun 09 '22 09:06 fred-dedi

Hi,

Same issue encountered with "Non webpack installation" : https://github.com/BitBagCommerce/SyliusCmsPlugin/blob/master/doc/01.5-non-webpack.md

No idea how to solve this problem.

Thx

laurentdabbb avatar Aug 01 '22 16:08 laurentdabbb

Fixed in #449

pbalcerzak avatar Sep 26 '22 12:09 pbalcerzak

Hello, I'm on 4.0.8 and I still get this error but only since I upgraded to Sylius 1.12. Ran yarn install and rebuilt my assets, but still pop in my console.

Any idea @pbalcerzak ?

Capture d’écran de 2023-11-15 18-16-27

Geolim4 avatar Nov 15 '23 17:11 Geolim4