optimize-css-assets-webpack-plugin
optimize-css-assets-webpack-plugin copied to clipboard
[6.0.0] PostCSS missing due to incorrect identification as peerDependency
This may not be an issue with optimize-css-assets-webpack-plugin itself.
On upgrading from 5.0.4 to 6.0.0 webpack builds fail due to a missing postcss@8 dependency. This is odd because it is a dependency in the packable.json (confirmed in the installed package in node_modules). However npm ls postcss reports it as an unmet peer dependency. A workaround is to install it as a peer, but that shouldn't be necessary as it is already a dependency.
- Webpack 4
- npm 6.14.12
[webpack-cli] Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
I'm seeing the same issue. I'm currently upgrading from 5.0.6 to 6.0.1 due to a vulnerability in a transitive dependency (normalize-url) and i'm being left with the following error:
├─┬ [email protected]
│ └── UNMET PEER DEPENDENCY [email protected]
@johnhunter were you able to resolve your issue?
The way I resolved it was to add postcss as a top level dependency. I've since upgraded to [email protected]. Just checked now and removing the postcss top level dependency has not caused the issue to recur but I've not tested in on CI yet.
Stale issue. Closing.