Weird package dependency problem, need help!

For some reason, when I add packages to my Meteor app, it keeps picking outdated versions!

I just installed Orion, and look at this:

orionjs:bootstrap            0.1.4* Orion CMS styled for bootstrap
orionjs:core                 0.7.7* Simple and powerful admin panel for meteor
orionjs:summernote           0.2.8* Summernote editor for orion

Why is it doing this? I did a meteor reset already, that didn’t fix it. meteor update won’t update them either.

Do meteor - - version to see if you’re using the latest on. If you are, Uninstall meteor and reinstall.

Yep, 1.1.0.2. Is there a way to officially uninstall Meteor? I’m guessing:

$ rm -rf ~/.meteor
$ sudo rm -f /usr/local/bin/meteor

I should clarify: it’s just this one project that is behaving this way. If I start a new Meteor project, the package problem is nonexistent.

This is weird. I did meteor show --show-all orionjs:core and got:

...
  0.7.7   April 16th, 2015      installed
  1.0.0   April 27th, 2015
  1.1.0   June 1st, 2015        installed

Something is corrupt in this project. Even if I do meteor remove orionjs:core, the above still show as installed. I tried doing rm -rf .meteor/local and that didn’t help. I’m at a loss here.

GOT IT. @aldeed’s autoform package is causing it. It’s forcing my app to install an older version of orion. Why??

Autoform does not have any orion dependencies:

It should be something else.

Deleting .meteor/versions often does the trick in this situation.

Nope, it is indeed autoform. I just added all of autoform’s dependencies, and then installed the orion core, and it was 1.1.0. Try it yourself, you’ll see. I did this on a freshly installed Ubuntu VM, too:

$ meteor create tmp
$ cd tmp
$ meteor add aldeed:autoform
$ meteor add orionjs:core

Sure enough, it installs version 0.7.7.

I wonder if this has something to do with Orion using autoform@5.1.2? So if autoform 5.3.0 is installed first, something goes haywire? There’s obviously a dependency breakage here.

Maybe @timfam has an idea.

Try running: meteor add orionjs:core@1.1.0
It should tell you the reason the package solver has not updated it automatically.

Nope, didn’t say a word about anything.

So did it update the package? If it runs without errors it should update to the version that you want.

Downgraded from “serious” to “weird” :wink:

Yeah, I can manually install 1.1.0, but I’m still wondering why, when autoform is installed, orion installs version 0.7.7. I was a bit flipped out because it was holding me up on a deadline and I couldn’t figure out why orion was behaving strangely.

1 Like

So I have worked out the reason, sort of. So orionjs:core actually uses aldeed:autoform version 5.1.2 so if you try to add orionjs after autoform, the version of autoform will be too recent. The package solver then tries to find the best combination of packages that doesn’t effect the 1. currently installed packages 2. transitive dependencies 3. direct dependencies. So for whatever reason, the cost function of the solver decided that using orionjs 0.7.7 was the best solution. If imagine it has to do with versions of aldeed:collection2 and aldeed:simple-schema (i.e. changing just orionjs was l but I am guessing at this point.

1 Like

@entropy: Good find! So, I’m wondering if installing orionjs:core@1.1.0 explicitly will cause anything to break, if the latest version of autoform is installed. Will orionjs still use the older version of autoform it depends on, and my app will use the latest version of autoform—is that how it works?

This is definitely a bug on orion’s part. Autoform has no dependencies to orion and has no possible way of finding out if orion is depending on an older version of itself.

The dependency resolver also does its part well. It is actually doing what it is designed to do.

In all this, orion is the one saying "hey I’m not going to be able to operate with a recent version of autoform so the solver should do its best to find the common denominator, which appears to be a very old version of orion.

If however, changing the order in which you add autoform and orion to your project does indeed change versions, than you may also want to raise this as a possible issue on meteor’s issue tracker.