Roots Discourse

Yarn build eror

I get an error message when entering yarn build

$ yarn build
yarn run v1.22.10
$ webpack --progress --config resources/assets/build/webpack.config.js
95% emitting ERROR Failed to compile with 2 errors22:40:02

error in ./resources/assets/styles/main.scss

Module build failed: ModuleBuildError: Module build failed: ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.

  • options has an unknown property ‘plugins’. These properties are valid:
    object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\schema-utils\dist\validate.js:104:11)
    at Object.loader (C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\postcss-loader\dist\index.js:43:29)
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\webpack\lib\NormalModule.js:195:19
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\loader-runner\lib\LoaderRunner.js:233:18

@ multi ./scripts/main.js ./styles/main.scss

error in ./resources/assets/styles/main.scss

Module build failed: ModuleBuildError: Module build failed: ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.

  • options has an unknown property ‘plugins’. These properties are valid:
    object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\schema-utils\dist\validate.js:104:11)
    at Object.loader (C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\postcss-loader\dist\index.js:43:29)
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\webpack\lib\NormalModule.js:195:19
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\Users\baina\Local Sites\bedrock\app\bedrock\web\app\themes\sage\node_modules\loader-runner\lib\LoaderRunner.js:233:18

                 Asset     Size  Chunks             Chunk Names
       scripts/main.js  8.98 kB       0  [emitted]  main
    

    scripts/customizer.js 3.24 kB 1 [emitted] customizer
    scripts/main.js.map 8.51 kB 0 [emitted] main
    scripts/customizer.js.map 3.07 kB 1 [emitted] customizer
    error Command failed with exit code 2.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I also edited the webpack.config.js file
/ * new StyleLintPlugin ({
failOnError:! config.enabled.watcher,
syntax: ‘scss’,
}), * /

thanks, I just read it.
and it worked