Gradebook MFE – npm run build – PostCSS plugin postcss-discard-comments requires PostCSS 8

So it appears that we updated webpack-cli to a newer version to match what the frontend-app-learning had with this PR fix(deps): update dependency webpack-cli to v4.10.0 by renovate[bot] · Pull Request #250 · openedx/frontend-build · GitHub.

We were receiving this error and that’s why we updated webpack-cli.

Resolving modules from local directories via module.config.js.
Using local version of @edx/frontend-build from ../src/frontend-build/src.
1% setup initialize[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (/edx/app/frontend-app-learning/node_modules/@webpack-cli/serve/lib/index.js:146:35)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/edx/app/frontend-app-learning/node_modules/webpack-cli/lib/webpack-cli.js:1672:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @edx/frontend-app-learning@1.0.0-semantically-released start: `fedx-scripts webpack-dev-server --progress`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @edx/frontend-app-learning@1.0.0-semantically-released start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-28T14_46_49_930Z-debug.log

> @edx/frontend-app-learning@1.0.0-semantically-released start /edx/app/frontend-app-learning
> fedx-scripts webpack-dev-server --progress

Leaving the following dependency solved our issue because webpack-cli was on a version 4.9.1.

"devDependencies": {
    "@edx/frontend-build": "5.5.2",
}

cc @arbrandes