Kevin
Kevin

Reputation: 341

Version conflict

I'm getting version conflicts on UUID. Basically, cached_network_image depends on uuid 2.0.0 while the socket packages depend on uuid 1.0.3

uuid:  ^1.0.3
cached_network_image: ^0.6.2
socket_io: ^0.9.0+1
socket_io_common: any
socket_io_common_client: ^0.10.0``

Because cached_network_image ^0.6.2 depends onflutter_cache_manager ^0.3.1 which depends on uuid ^2.0.0, cached_network_image ^0.6.2 requires uuid ^2.0.0.

So, because <PROJECT NAME> depends on both uuid ^1.0.3 and cached_network_image ^0.6.2, version solving failed.

I tried using UUID ^1.0.3 to include this version and 2.0.0 but to no avail.

Tried contacting the authors of the latter packages to upgrade their UUID dependency to the latest one but they haven't replied yet. I also opened an issue to their repo.

Here are some links:

https://pub.dartlang.org/packages/socket_io

https://pub.dartlang.org/packages/socket_io_common

https://pub.dartlang.org/packages/socket_io_common_client

https://github.com/rikulo/socket.io-client-dart

Upvotes: 2

Views: 1081

Answers (2)

Kevin
Kevin

Reputation: 341

Had the author update the UUID package. Closing this thread!

Upvotes: 0

ckarthickit
ckarthickit

Reputation: 21

One thing you can do is replace the version numbers with any like below:

uuid:  any
cached_network_image: any
socket_io: any
socket_io_common: any
socket_io_common_client: any

Let Pub's version constraint resolver do it's work . Once version conflict is resolved, you can look at the pubspec.lock file and update the corresponding version numbers in your pubspec.yaml file .

This should unblock you from this problem. You can try upgrading your version, once the corresponding plugins update their dependencies.

Upvotes: 2

Related Questions