Error with yarn encore dev
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?").
Same problem here !
Same here. I fixed it by removing the .babelrc file and upgrading symfony/encore.
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.
Should be fixed in newest releases. If not, please reopen with info about used version.