Closed robinjoseph08 closed 8 years ago
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 https://github.com/npm/npm/issues/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 (https://github.com/npm/npm/issues/10836#issuecomment-221500519).
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.
Since watchify isn't required for all setups, making it a
peerDependency
prints an unavoidable error whennpm install
ing (UNMET PEER DEPENDENCY watchify@>=3 <4
), and it prevents me from runningnpm 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.