SyliusCrafts / BootstrapTheme

Sylius Bootstrap theme with build process based on Webpack Encore
94 stars 56 forks source link

Sylius 1.11.7 compatibility - as a composer dependency (with child theme) #104

Closed H4Mm3r closed 1 year ago

H4Mm3r commented 2 years ago

Hello,

On a fresh Sulius 1.11.7 install :

$ composer create-project sylius/sylius-standard dev $ cd dev $ composer update sylius/sylius --with-all-dependencies [some settings in config/services.yaml and .env.local] $ php bin/console sylius:install $ yarn install $ yarn build

I'm following the doc https://docs.sylius.com/en/latest/book/themes/bootstrap-theme.html mentioned on this repo's main page and after the composer require sylius/bootstrap-theme and the edit of config/packages/_sylius.yaml, a refresh gives an error :

An exception has been thrown during the rendering of a template ("Asset manifest file "/opt/sylius/dev/public/build/manifest.json" does not exist. Did you forget to build the assets with npm or yarn?").

Tried yarn build, next steps of the doc, nothing helped.

Thanks by advance.

H4Mm3r commented 2 years ago

Seems that replacing the whole content of config/packages/webpack_encore.yaml with

webpack_encore: output_path: '%kernel.project_dir%/public/build' builds: bootstrapTheme: '%kernel.project_dir%/public/bootstrap-theme'

is fixing the behaviour, but compilation fails :

Error: Node Sass version 7.0.1 is incompatible with ^4.0.0.

H4Mm3r commented 2 years ago

Fixed using sass instead of node-sass :

yarn remove node-sass yarn add sass

Is it a solution ?