Thanks for the reply! Sorry about this, but now I'm intrigued about peer dependencies and want to ask lots of questions.
1. ok so I think I have it, I grepped through my node_modules for peerDependency and the version of react under server-jsx has a peerDependency on envify ~1.2.0, and server-jsx itself also has a normal dependency on envify ~1.0.1 2. so packages that have peer dependencies must not conflict, and npm has the unenviable task of trying to find a version of the peer dependency that all packages are happy with. Now I understand your "requirements of a package are too narrow" statement. If that is the case, why not call them globalDependencies? Or is that muddying up the concept again? 3. And to finish, that means that server-jsx 0.0.2 can never have worked right? It seems like it's got a fundamental version conflict and it couldn't possibly ever work. In this case, just to spitball an idea, the error message could be "Error, your package tree is trying to install envify as a peerDependency but also has a different version dependency elsewhere." Ultimately it'd be nice if it told me that I've just tripped over someone else's crazy dependency problem - "package server-jsx can't be installed because it's dependencies have gone bonkers, just file a bug and walk away buddy". I don't know if that's possible though. Or if it's even the case. On Tuesday, 20 January 2015 05:15:53 UTC+11, Aria Stewart wrote: > > > > On 19 Jan 2015, at 05:49, Damon Smith <[email protected] <javascript:>> > wrote: > > > > I just tried to use npm to install server-jsx and I got an error message > saying: > > > > The package envify does not satisfy its siblings' peerDependencies > requirements! > > > > and I wonder if there is a way to improve this error message, because > this one is just no use to me. It seems to me, from reading this: > http://blog.nodejs.org/2013/02/07/peer-dependencies/ > > that peer dependencies are basically saying "I'm not going to do > dependency management for you on this package, you'll need to do it > yourself". Now, I don't know, this probably isn't the case really but at > the moment I have a different problem to get started on and I don't really > want to know the massively complex detail of the npm dependency system. > Yet. I'm sure I will soon enough, whether I like it or not, but I just want > to put it off for now and try out react-jsx rendering on the server side. > > That's not exactly what it does: peerDependencies are what every other > dependency management system calls dependencies. It's the model where > dependencies can conflict, in unresolvable ways: foo peerDepends on bar@2, > baz peerDepends on bar@1: not resolvable. One of them would have to be > broken. > > Normal dependencies, because they're scoped in node, don't have this > problem: if foo and baz need different bar modules, they each get a copy in > node. > > However, this can't express a "plugin" pattern dependency. If someone's > made those, you're stuck with peerDependencies. > > > > > So, can anyone tell me, would it be better for the error message to say > something like: > > > > Package server-jsx has a peer dependency on envify@~1.2.0 which has not > been satisfied, which means you must manually include the envify package to > be able to install server-jsx. > > That's not really a general solution: The solution is to use modules that > depend on compatible versions of envify. If the requirements of a package > are too narrow, that's a bug in that package. > > > > > Or is that just not really what's happening here? Either way, I'm all > about the error messages, and that one that needs some work. > > Yeah. It's terrible, but explaining what's going on in the abstract often > doesn't explain what's going on in any specific case. Suggestions are > welcome, but it's not going to be easy! > > Aria -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/0201ed77-41ea-49fc-a729-6ba252c6d03b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
