Remove watchify from peerDependencies
Closed this issue · 2 comments
Since watchify isn't required for all setups, making it a peerDependency
prints an unavoidable error when npm install
ing (UNMET PEER DEPENDENCY watchify@>=3 <4
), and it prevents me from running npm shrinkwrap --dev
(because of the unmet peer dependency).
I think just mentioning it in the docs in the watchify config section and the error messages you already print out is enough to get people to install it if they need it.
Removing it from peerDependencies
also eliminates the error if you have an unsupported watchify version. Removing it means "bring any major version you want" which could easily break.
Read npm/npm#10836. I'm totally okay with the warning but breaking shrinkwrapping is no good. Ideally npm would support ignoring missing peers (as was originally requested) and not invalid ones (npm/npm#10836 (comment)).
Implementing a semver check at runtime is a viable solution here. I don't have time to do it today, wanna take a stab at a PR?
We are not going to implement this any time soon. Feel free to add a PR improving things.