SyliusCrafts / BootstrapTheme

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

Sylius 1.11.7 compatibility - in themes folder #105

Closed H4Mm3r closed 10 months 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 this repository documentation.

First yarn encore dev run :

ERROR Failed to compile with 5 errors Error: Node Sass version 7.0.1 is incompatible with ^4.0.0.

After yarn add sass-loader@^4.0.0 node-sass lodash.throttle -D :

ERROR Failed to compile with 5 errors TypeError: Cannot read property 'sassLoader' of undefined

So if I follow the warning WARNING Webpack Encore requires version ^13.0.0 of sass-loader, but your version (4.1.1) is too old. The related feature will probably *not* work correctly." with yarn add @symfony/webpack-encore sass-loader@^13.0.0 node-sass lodash.throttle -D :

  1. had to fix a double semicolons error in ./node_modules/semantic-ui-css/semantic.css with causes an error with sass-loader 13.
  2. finally had it compiling properly but :

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?").

Thanks by advance. H4Mm3r

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, you can't just adjust needed lines. Am I right ?

oallain commented 10 months ago

Hello,

Fixed in v1.0.0

If you still have the problem, you can re-open this issue.