Hi all,
I’ve started to upgrade my meteor-1.6 based app (twbs:bootstrap@3.3.6, jquery@1.11.10) to meteor-1.9.
I hoped to keep the client UI code so that’s why I’ve tried to downgrade the default jquery@3.0.0 in meteor-1.9 back to jquery@1.11.10. I got:
$ meteor add jquery@1.11.10
=> 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":
* jquery@1.11.10 <- 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 .meteor/packages
and .meteor/versions
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.
That said, jquery@3.0.0
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
1 Like
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 jquery@3.0.0. That is, both .meteor/packages and .meteor/versions didn’t contain the jquery entry when I ran meteor add jquery@1.11.10.
Now, I tried to manually added jquery to .meteor/packages and jquery@1.11.10 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 jquery@1.11.10!
to try to force meteor to use that version?
Hi coagmano,
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 jquery@1.11.10!
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 jquery@1.11.10 and bootstrap@3.3.6 as local packages into my meteor-1.9 based app.