SyliusCmsPlugin icon indicating copy to clipboard operation
SyliusCmsPlugin copied to clipboard

Error with yarn encore dev

Open fabrityzbigniewn opened this issue 3 years ago • 2 comments

Hi, Can anybody help me with this error: Running webpack ...

ERROR Failed to compile with 1 errors 12:47:54 PM

error in ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/index.js

Module parse failed: Unexpected token (7:68) File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | } |

if (document.querySelectorAll('[data-bb-target="cms-slug-update"]')?.length > 0) { | new HandleSlugUpdate().init(); | }

@ ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/entry.js 1:0-14

DONE Compiled successfully in 2135ms 12:47:54 PM

I 2 files written to public/build/bitbag/cms/shop ERROR Failed to compile with 1 errors 12:47:56 PM

error in ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/index.js

Module parse failed: Unexpected token (7:68) File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | } |

if (document.querySelectorAll('[data-bb-target="cms-slug-update"]')?.length > 0) { | new HandleSlugUpdate().init(); | }

@ ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/entry.js 1:0-14

ERROR Failed to compile with 1 errors 12:47:57 PM

error in ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/js/index.js

Module parse failed: Unexpected token (7:68) File was processed with these loaders:

  • ./node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | } |

if (document.querySelectorAll('[data-bb-target="cms-slug-update"]')?.length > 0) { | new HandleSlugUpdate().init(); | }

@ ./vendor/bitbag/cms-plugin/src/Resources/assets/admin/entry.js 1:0-14 @ ./assets/admin/entry.js

When I start the server I also have this error 500 - An exception has been thrown during the rendering of a template ("Asset manifest file "/home/sylius/MyFirstShop/public/build/manifest.json" does not exist. Did you forget to build the assets with npm or yarn?").

fabrityzbigniewn avatar May 06 '22 10:05 fabrityzbigniewn

Same problem here !

canariamine avatar May 18 '22 09:05 canariamine

Same here. I fixed it by removing the .babelrc file and upgrading symfony/encore.

MedAhamada avatar May 23 '22 18:05 MedAhamada

Hello, you need to upgrade symfony/webpack-encore in package.json to version: "@symfony/webpack-encore": "^1.7.0"

The second problem related to the missing manifest is due to your webpack configuration.

liszkapawel avatar Oct 06 '22 10:10 liszkapawel

Should be fixed in newest releases. If not, please reopen with info about used version.

damonsson avatar Jan 27 '23 10:01 damonsson