Skip to content
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

SWR requires a peer of [email protected] #180

Closed
Svish opened this issue Dec 6, 2019 · 4 comments
Closed

SWR requires a peer of [email protected] #180

Svish opened this issue Dec 6, 2019 · 4 comments

Comments

@Svish
Copy link
Contributor

Svish commented Dec 6, 2019

[email protected] requires a peer of [email protected] but none is installed.

Is it really necessary with such a specific peer dependency requirement as you have now?

  "peerDependencies": {
    "react": "16.11.0"
  }

The current React version is 16.12.0, so on every npm install I now get warnings from swr. 😕

@wzhudev
Copy link
Contributor

wzhudev commented Dec 6, 2019

- "react": "16.11.0"
+ "react": "^16.11.0"

@Svish
Copy link
Contributor Author

Svish commented Dec 6, 2019

@wendellhu95 That would be better, but still wouldn't accept 16.12.0, would it?

Assuming react won't break anything until a new major version is released, and you do need at least version 16.11.0, I guess it could be like this?

"react": ">= 16.11.0 < 17"

@wzhudev
Copy link
Contributor

wzhudev commented Dec 6, 2019

^ can cover any upcoming minor versions. It's equivalent to >= 16.11.0 < 17.

Messed it up with ~?

Doc and examples.

@Svish
Copy link
Contributor Author

Svish commented Dec 6, 2019

@wendellhu95 Ah, then definitely ^ 👍

Just a newb who thought ^ was for the patch version and didn't even know ~ was a thing 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants