[Solved] Versions constraints on Coffeescript with useraccounts:unstyled

Hi everybody,

I’m trying to update my meteor app to 1.8 (I am still on 1.4…)
One of the reason for not updating is that I use useraccounts:unstyled to use my own templates for the loginform.
If I try to use coffeescript@2.4.1 with unstyled, I run in to a version conflict:

error: Potentially incompatible change required to top-level dependency: coffeescript 1.0.17, was 2.4.1.

Constraints on package "coffeescript":

* coffeescript@1.0.4 <- softwarerero:accounts-t9n 1.3.11 <- useraccounts:core 1.14.2 <- useraccounts:unstyled 1.14.2

Apparently the useraccounts:unstyled package has not been updated for a very long time, even as it is still part of the core useraccounts-package? How can this be resolved?



You can “weaken” package version constraints by editing your .meteor/packages file and adding an ! to the package:

coffeescript@2.4.1! # note the !

To quote the changelog:

If a package version constraint in .meteor/packages ends with a !
character, any other (non-!) constraints on that package elsewhere in
the application will be weakened to allow any version greater than or
equal to the constraint, even if the major/minor versions do not match.

For example, using both CoffeeScript 2 and practicalmeteor:mocha used
to be impossible (or at least very difficult) because of this
statement, which unfortunately constrained the coffeescript package to
version 1.x. In Meteor 1.8, if you want to update coffeescript to
2.x, you can relax the practicalmeteor:mocha constraint by putting

coffeescript@2.2.1_1! # note the !

in your .meteor/packages file. The coffeescript version still needs
to be at least 1.x, so that practicalmeteor:mocha can count on that
minimum. However, practicalmeteor:mocha will no longer constrain the
major version of coffeescript, so coffeescript@2.2.1_1 will work.


1 Like

WOW! Thank you!
My browser logged me out; that’s why I missed your post. Tried it, an it works!

1 Like