Issue updating from Meteor 1.5.2 to 1.8.1

I’m trying update my version of meteor, but a have this error.

While selecting package versions:
error: Conflict: Constraint babel-compiler@6.19.1 is not satisfied by babel-compiler 7.4.2.
Constraints on package “babel-compiler”:

  • babel-compiler@~7.4.0 <- top level
  • babel-compiler@7.4.0 <- ecmascript 0.13.0
  • babel-compiler@7.4.0 <- minifier-js 2.5.0 <- standard-minifier-js 2.5.0
  • babel-compiler@7.4.0 <- standard-minifier-js 2.5.0
  • babel-compiler@6.19.1 <- coffeescript 1.12.6_1 <- nimble:restivus 0.8.11
1 Like

I was in similar situation once, While I don’t have an answer to your question, I ended up creating new meteor project and moved my files gradually to it, it took me 1 day or so to move everything over, I think it would have taken me longer to figure out why babel and CoffeeScript didn’t want to dance together.

Yeah the upgrade to coffeescript 2 around that time caused this issue for a lot of people. Here, your babel-compiler issue is through coffeescript as a secondary dependency.

The first thing to try is to update with --allow-incompatible-update and --all-packages to see if it can resolve the version constraints with new versions (warning, this can introduce breaking changes to packages)

Otherwise, this is exactly the reason that in Meteor 1.8, a feature was introduced that is basically the !important of package versioning.
So in your .meteor/packages, you can add an ! to the end of a package to say, I want this version and please ignore version constraints from packages:

So in your case, I would try to target that coffeescript dependency with:

coffeescript@2.0.0!

More info from History.md:

The .meteor/packages file supports a new syntax for overriding problematic version constraints from packages you do not control.

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 api.versionsFrom("1.3") 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.


PS: Welcome to the forums!

thanks, but i have an new issue, after follow this instrucitons, someone help me?

this is the message.
TypeError: Cannot read property ‘find’ of undefined

Can you provide the full stack trace? so we can see where the error is coming from?

Looking at the error and your deleted post, it looks like the error is related to a collection that isn’t defined in another scope correctly.
Are you using imports / require to access modules, or are collections declared in the global scope?

thanks, i uninstall my meteor and install again and work .