-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple @accounts/client versions: consider using peerDependencies #33
Comments
Yes it does. Do you mind sending PR? |
Actually, no need for the PR, I'll handle this in mine. |
I don't know if GitHub notifies edits, so ping 😛 Just found out that only one version of |
Github edits don't notify. I wish they did (as well as reactions). Thanks. |
Material ui should also be marked as a peer dependency. |
I'm not so sure about that one. |
Here is my reasoning: If the consuming code is using the |
Oops, sorry, I thought you were referring to react-material-ui. Now it's crystal clear 😄 |
If you follow the installation procedure stated in the README, there will be multiple versions of
@accounts/client
installed resulting in the following error when loading the page:You can reproduce it by starting a project from scratch, which as of today, leads to the following packages being installed:
Also, in js-accounts/examples you can remove client package from package.json and do
now when you run the example the cited exception should appear.
This error is produced by the fact that multiple versions of
@accounts/client
introduce different instances of theAccountClient
class being used by the several modules that require it.By switching to using peer dependencies the user of react and react-material-ui can upgrade other components of js-accounts independently as long as versions are compatible.
Does this make sense?
EDIT: I revisited this issue (because of trying out graphql support) and realised that it was not commons the culprit but
@accounts/client
.The text was updated successfully, but these errors were encountered: