I’ve started to upgrade my meteor-1.6 based app (twbs:firstname.lastname@example.org, email@example.com) to meteor-1.9.
I hoped to keep the client UI code so that’s why I’ve tried to downgrade the default firstname.lastname@example.org in meteor-1.9 back to email@example.com. I got:
$ meteor add firstname.lastname@example.org
=> Errors while adding packages:
While selecting package versions:
error: No version of jquery satisfies all constraints: @1.11.10, @=3.0.0
Constraints on package "jquery":
* email@example.com <- top level
* jquery@=3.0.0 <- top level
Where is jquery version constraint defined in meteor-1.9?
How can I force the downgrade of jquery?
Thank you for reading.
you’ll find it in
packages might have the version constraint, but if it doesn’t,
versions will and you’ll have to remove it from
versions to get it to accept a lower major version anyway.
firstname.lastname@example.org doesn’t force you to use a specific jquery version anymore. So you can install the exact version you want from npm, and it will load and expose that version globally, exactly as legacy packages would expect, so I’d suggest trying that first
Thank you for your answer. In the original post, I forgot to metion that before installing the old jquery, I actually already removed the default email@example.com. That is, both .meteor/packages and .meteor/versions didn’t contain the jquery entry when I ran meteor add firstname.lastname@example.org.
Now, I tried to manually added jquery to .meteor/packages and email@example.com to .meteor/versions. But meteor list or meteor run automatically switched jquery version back to 3.0.0. That made me assume that there would be a jquery version constraint hidden somewhere.
Was meteor running when you removed them?
I just tried downgrading jquery in a fairly large 1.9 project by following the above instructions and it worked first time.
You could try adding an exclamation mark after the version in packages
firstname.lastname@example.org! to try to force meteor to use that version?
Thanks for your test.
Meteor was never running in my test. Now I’ve tried again with a completely fresh app:
meteor create testapp,
meteor remove jquery,
meteor add email@example.com! and got the same constraint failure.
Then I set env variable METEOR_LOG=debug and discovered that the constraint check was done using packages and versions dependencies info stored in <meteor_dir>/.meteor/package-metadata/v2.0.1/v2.0.1/packages.data.db
where <meteor_dir> is the location of my meteor installation (not my meteor app). The file is a sqlite db with which I know enough about how to alter the content and also tried to play with it a little bit but no luck.
Eventually, following this suggestion JQuery version conflict - How to handle?
I successfully installed firstname.lastname@example.org and email@example.com as local packages into my meteor-1.9 based app.