-
Notifications
You must be signed in to change notification settings - Fork 782
Fresh new install gives unmet peer dependencies warnings with yarn #3394
Comments
Experiencing the same. I'm using yarn. |
Respectfully, I would classify this as desired behavior. Open source packages commonly specify peer dependencies and yarn/npm is being helpful with these warning messages e.g. doing a |
I see your point @hansjhoffman though I would argue the documentation of React states that you have to install react alongside react-dom. It's not the case for Apollo's doc. That put aside, it's strange that yarn and npm does not results in the same missing peer deps (though it's more their problem than Apollo's). |
As mentioned in #3394 (comment), this is desired behavior. This is all going to change very soon when React Apollo is merged into the Apollo Client project. Thanks! |
So the idea for now is for me to add every peer deps to my project, ie "@types/react@^16.8.0", "apollo-client@^2.6.4" and "apollo-utilities@^1.3.2". Correct @hwillson ? |
Thing is yarn complains even when the required peer dependencies are already installed if the version is mismatching. for example in my project I'm using react@latest(16.10.2) and the following shows in yarn: Is this desired behavior? |
For me, I'm getting warnings about typescript peer dependencies, which I'm not using:
So |
What is the timing of this "very soon"...? |
To simplify things, do I need to install these for things to work or not. That's all I need to know. |
npm root -g |
or simply cleaning global |
|
|
The answer is a bit complicated (which is why we're super excited to finally merge parts of this project into Apollo Client). The most important peer dep to have is If you're just using React Apollo's hooks, I suggest trying out the Apollo Client 3 beta ( |
Intended outcome:
I tried to start a new Apollo project, based on the documentation I issued:
Which gave:
Actual outcome:
I would expect either no warnings or those peer deps being mentioned in the documentation
Note that with npm instead of yarn, I only get those warnings:
How to reproduce the issue:
yarn init
yarn add react react-dom apollo-boost @apollo/react-hooks graphql
Version
The text was updated successfully, but these errors were encountered: