I just tried to upgrade my Meteor app from 2.2.1 to the latest 2.5.6. However, I get stuck in Meteor’s accounts dependency hell. Some abandoned packages seem to “pin” accounts-base to an 1.x version, which prevents Meteor from updgrading it to accounts-base@2.2.1.
I do not really understand why this happens, since all of these packages do not set a specific accounts-base version. They just call api.use('accounts-base'). What Meteor magic makes them pin the package to 1.x then? I assume the culprit are the api.versionsFrom calls, which explicitly state Meteor 1.x. But why would versionsFrom pin a package in the first place? I would expect that any newer version is valid.
Is there any way out of this dependency hell, if the packages themselves are not maintained anymore? I know that I can create a local copy of them and patch them. But would it be safe to just tweak the versionsFrom setting?
Is there any description about how the whole package dependency resolution mechanism works? It seems to be pretty weird to me.
=> Errors while initializing project:
While selecting package versions:
error: Conflict: Constraint accounts-base@1.2.8 is not satisfied by accounts-base 2.2.1.
Constraints on package "accounts-base":
* accounts-base@~2.2.1 <- top level
* accounts-base@2.2.0 <- accounts-password 2.2.0
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- accounts-base 2.2.1 <- accounts-facebook 1.3.3
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.4.2 || 2.0.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.2.8 <- loren:login-links 0.1.3
* accounts-base@1.9.0 || 2.0.0 <- alanning:roles 1.3.0
* accounts-base@1.4.3 <- quave:accounts-apple 1.1.3
* accounts-base@2.1.0 <- accounts-oauth 1.4.0 <- accounts-facebook 1.3.3
* accounts-base@1.4.3 <- quave:apple-oauth 1.4.2 <- quave:accounts-apple 1.1.3
* accounts-base@2.0.0 <- accounts-facebook 1.3.3
* accounts-base@1.2.14 <- bozhao:link-accounts 2.2.1
* accounts-base@2.0.0 <- accounts-google 1.4.0
Conflict: Constraint accounts-base@1.4.3 is not satisfied by accounts-base 2.2.1.
Constraints on package "accounts-base":
* accounts-base@~2.2.1 <- top level
* accounts-base@2.2.0 <- accounts-password 2.2.0
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- accounts-base 2.2.1 <- accounts-facebook 1.3.3
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.4.2 || 2.0.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.2.8 <- loren:login-links 0.1.3
* accounts-base@1.9.0 || 2.0.0 <- alanning:roles 1.3.0
* accounts-base@1.4.3 <- quave:accounts-apple 1.1.3
* accounts-base@2.1.0 <- accounts-oauth 1.4.0 <- accounts-facebook 1.3.3
* accounts-base@1.4.3 <- quave:apple-oauth 1.4.2 <- quave:accounts-apple 1.1.3
* accounts-base@2.0.0 <- accounts-facebook 1.3.3
* accounts-base@1.2.14 <- bozhao:link-accounts 2.2.1
* accounts-base@2.0.0 <- accounts-google 1.4.0
Conflict: Constraint oauth@1.2.8 is not satisfied by oauth 2.1.1.
Constraints on package "oauth":
* oauth@~2.1.1 <- top level
* oauth@2.1.0 <- accounts-oauth 1.4.0 <- accounts-facebook 1.3.3
* oauth@1.2.8 <- quave:apple-oauth 1.4.2 <- quave:accounts-apple 1.1.3
* oauth@2.0.0 <- oauth2 1.3.1 <- facebook-oauth 1.10.0 <- accounts-facebook 1.3.3
* oauth@2.1.0 <- facebook-oauth 1.10.0 <- accounts-facebook 1.3.3
* oauth@1.1.13 <- bozhao:link-accounts 2.2.1
* oauth@2.0.0 <- google-oauth 1.4.1 <- accounts-google 1.4.0
Conflict: Constraint oauth@1.1.13 is not satisfied by oauth 2.1.1.
Constraints on package "oauth":
* oauth@~2.1.1 <- top level
* oauth@2.1.0 <- accounts-oauth 1.4.0 <- accounts-facebook 1.3.3
* oauth@1.2.8 <- quave:apple-oauth 1.4.2 <- quave:accounts-apple 1.1.3
* oauth@2.0.0 <- oauth2 1.3.1 <- facebook-oauth 1.10.0 <- accounts-facebook 1.3.3
* oauth@2.1.0 <- facebook-oauth 1.10.0 <- accounts-facebook 1.3.3
* oauth@1.1.13 <- bozhao:link-accounts 2.2.1
* oauth@2.0.0 <- google-oauth 1.4.1 <- accounts-google 1.4.0
Conflict: Constraint accounts-base@1.2.14 is not satisfied by accounts-base 2.2.1.
Constraints on package "accounts-base":
* accounts-base@~2.2.1 <- top level
* accounts-base@2.2.0 <- accounts-password 2.2.0
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- accounts-base 2.2.1 <- accounts-facebook 1.3.3
* accounts-base@2.2.0 <- service-configuration 1.3.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.4.2 || 2.0.0 <- meteoreact:accounts 1.2.4_1
* accounts-base@1.2.8 <- loren:login-links 0.1.3
* accounts-base@1.9.0 || 2.0.0 <- alanning:roles 1.3.0
* accounts-base@1.4.3 <- quave:accounts-apple 1.1.3
* accounts-base@2.1.0 <- accounts-oauth 1.4.0 <- accounts-facebook 1.3.3
* accounts-base@1.4.3 <- quave:apple-oauth 1.4.2 <- quave:accounts-apple 1.1.3
* accounts-base@2.0.0 <- accounts-facebook 1.3.3
* accounts-base@1.2.14 <- bozhao:link-accounts 2.2.1
* accounts-base@2.0.0 <- accounts-google 1.4.0