Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

npm WARN purgecss-webpack-plugin@1.2.0 requires a peer of webpack@^4.11.1 but none is installed. You must install peer dependencies yourself. #40

Closed
sinanerdem opened this issue Aug 5, 2018 · 6 comments · Fixed by #51

Comments

@sinanerdem
Copy link

Describe the bug
I believe this plugin supports webpack 3 which I am using (webpack 3.12.0)
Whenever I install a new npm module, there are two warnings:

npm WARN purgecss-webpack-plugin@1.2.0 requires a peer of webpack@^4.11.1 but none is installed. You must install peer dependencies yourself.
npm WARN purgecss-webpack-plugin@1.2.0 requires a peer of webpack-cli@^3.0.2 but none is installed. You must install peer dependencies yourself.

To Reproduce
Steps to reproduce the behavior:

Install any other npm module.

Expected behavior
Nothing

@jsnanigans
Copy link
Collaborator

Thanks for reporting this, the webpack warning is easily fixed, however i'm not sure that you can define a optional peer-dependency - webpack-cli.

but otherwise its working for you right?

Ill try to fix these warnings when I have some time.

@sinanerdem
Copy link
Author

Thank you. It doesn't effect the operation of the plugin. It was just a bit confusing.

@sebastiandedeyne
Copy link

Is Webpack 3 still supported? Doesn't the peerDependency need to be changed to something like ^3 || ^4?

@jsnanigans
Copy link
Collaborator

Thanks for the suggestion, I changed the webpack peerDependency however I don't think we can get rid of the warning for webpack-cli

@calebeby
Copy link
Contributor

@jsnanigans Why does this package even have a peerDependency on webpack-cli at all? This package can work with the webpack api without the CLI, right? Can I send a PR to remove the peerDependency on webpack-cli?

@jsnanigans
Copy link
Collaborator

@calebeby you have a good point, the only reason its there is for the tests, so It should be enough for it to be in the devDependencies.
A PR would be very welcome, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants