readme|package.json: cerebral-url-scheme-compiler dependency
fvgoto opened this issue · comments
Upon simple usage as indicated in README, I get following error:
Error: Cannot find module 'cerebral-url-scheme-compiler/get' from '..../node_modules/cerebral-module-http/helpers'
It turns out cerebral-module-http
has that url-compiler as peerDependency
.
The requirement to install it is not mentioned in the README.
And strangely there is no indication about this peerDep being missing upon installation of http (running npm 2.15.1; other packages throw a warning about missing peers and npm<3 installs it automatically)
An other thing:
In comparison, the package cerebral-addons
has cerebral-url-scheme-compiler
(^0.4.1) as plain dependency (not peer). Would be great if cerebral-module-http
and cerebral-addons
would handle it the same way (one or the other)...
Am I wrong on some point?
No, you are completely right here. It is a bitch to handle dependencies that you want to ensure, but not duplicate. Also a matter of user friendliness... do not want devs to explicitly install cerebral-url-scheme-compiler
.
@Guria What happens if we make url-scheme-compiler a dependency on both projects? Pointing to ^0.4.x
... will it install only one?
@christianalfoni it should be only one until ranges compatible. anyway url-scheme-compiler
could be safely moved to regular dependencies.
Okay, cool, lets do that here then. If you plan on more contributions @fvgoto you can just move the peerDependency to a dependency :)
Closing, since kind of solved by merged PR #10.
@christianalfoni Feel free to re-open if you want to keep a "todo" around to switch both to peer (again) when versions get in-sync and/or its required installation get mentioned in readme (or whatever...).