I'm trying to figure out a peer dependency issue and everything looks fine to me...
My package.json has:
, "devDependencies" : {
"gulp-watchify" : "^0.2.0"
, "watchify" : "^0.10.2"
}
And gulp-watchify/package.json has:
"peerDependencies": {
"watchify": "^0.6.1"
},
0.10.2 staisfies ^0.6.1, no? So why is npm complaining:
npm ERR! peerinvalid The package watchify does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants watchify@^0.6.1
npm ERR! System Darwin 14.0.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd <path redacted>
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! <path redacted>/npm-debug.log
npm ERR! not ok code 0
???
The reason here is 0.10.2 does not actually satisfy ^0.6.1, since 0.X.X versions are a special semver category of unstable versions. Moving from 0.1.X to 0.2.X indicates a breaking change, so they are not compatible. From the semver docs:
^0.1.3 := >=0.1.3-0 <0.2.0-0 "Compatible with 0.1.3". 0.x.x versions are special: the first non-zero component indicates potentially breaking changes, meaning the caret operator matches any version with the same first non-zero component starting at the specified version.
To fix this you can either remove your dependency on watchify, or set it to something along the 0.6.X release line, such as:
, "devDependencies" : {
"gulp-watchify" : "^0.2.0"
, "watchify" : "^0.6.4"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With