-
Notifications
You must be signed in to change notification settings - Fork 223
Upgrade of react-network to 5.0.0 causing render error #2285
Comments
Relevant PR in this repo that had most of the changes in the release: #2277 |
react-network, along with most other react-* packages in quilt use react contexts and you need to make sure that only a single version is present is present in your app otherwise you end up with mismatches between context providers and callers. Because of this we recommend updating all the packages that come from quilt at the same time, so you don't get bit by transitive dependencies still depending on older versions - in your case Your PR added a new version of react-network v5, but you did not update any other other packages or add resolutions to ensure that other usages of v4 were removed. And thus you ended up with multiple versions of the package installed, which lead to context mismatches. I'm closing this issue because it is not due to code that lies within the quilt repository. |
Oh interesting! Thank you. So all packages being used from quilt need to be updated together - they are interdependent and can't be upgraded reliably independently. |
When it comes to major version updates, yes, because for instance if you don't you can end up in a case where: You depend on This is one example, but this case of "providers and contexts need to come from the same version" crops up in all the quilt packages that provide react contexts. |
Thanks! I'll try upgrading them together. |
Overview
We upgraded the
flow
repo to @shopify/react-networkv5.0.0 today and saw rendering errors upon deploy: https://github.com/Shopify/flow/pull/14856Error: You must provide a network-details value, or have one previously serialized.
Original dependency update: https://github.com/Shopify/flow/pull/14853
Should we see that error? Is there an upgrade path for us? It seems like all that was changed in the 5.x release was a wildcard export (maybe causing this?) and some target node versions....
Consuming repo
https://github.com/Shopify/flow/pull/14856
Area
Area: <area>
labels to this issueScope
Is this issue related to a specific package?
Package: <package_name>
label.Checklist
The text was updated successfully, but these errors were encountered: