If you’re currently using Meteor 1.4.2, it is strongly recommended that you run meteor update
as soon as possible, and also meteor npm install --save babel-runtime
, if your app does not already depend on that npm package.
As you can tell from the release notes, Meteor 1.4.2.1 fixes a number of bugs, some of which may have prevented you from upgrading to Meteor 1.4.2, and even includes some further performance tweaks.
However, the urgency of this message comes from a specific issue with the Meteor babel-runtime
package.
If you don’t care about the details, you can stop reading now and just run meteor update
. In case you’re curious, I’ll try to explain what happened below.
If you’re running Meteor 1.4.2 and you happen to update just your packages (not Meteor itself), you will likely end up with babel-runtime@1.0.0
, which is a new version of the Meteor babel-runtime
package introduced by this pull request. Most notably, this version of the Meteor babel-runtime
package now requires you to install the npm babel-runtime
package in your app.
Relying on the npm version of babel-runtime
is a good idea in the long term, but in the short term Meteor 1.4.2 still assumes that the Meteor babel-runtime
package provides custom implementations of certain Babel helpers, such as babel-runtime/helpers/typeof
and babel-runtime/helpers/createClass
, and unfortunately ignores any helpers of the same names provided by the npm babel-runtime
package.
Since version 1.0.0
of the Meteor babel-runtime
package no longer provides any Babel helpers of its own, and Meteor 1.4.2 assumes that it does, babel-runtime@1.0.0
is effectively incompatible with Meteor 1.4.2, though it will work with any other recent version of Meteor, as long as you’ve run meteor npm install --save babel-runtime
in your app.
It is tempting to release a babel-runtime@1.0.1
that provides the custom helpers that Meteor 1.4.2 expects, but that would defeat the purpose of switching to the npm version of babel-runtime
, and delay everyone from arriving at a better solution. Upgrading to Meteor 1.4.2.1 is the best solution available now.
Though it is the recommended solution, upgrading to Meteor 1.4.2.1 is not the only way to work around this problem. The important thing is to avoid using babel-runtime@1.0.0
with Meteor 1.4.2. Another option would be to downgrade babel-runtime
to the previous version by running meteor add babel-runtime@=0.1.12
in your app (note the @=
). The drawback of this approach is that it prevents any future upgrades to the babel-runtime
package, unless you remember to remove the @=0.1.12
version constraint from your .meteor/packages
file. But if you really must continue using Meteor 1.4.2, downgrading babel-runtime
will let you do that.
If you’ve read this far, I hope your curiosity is satisfied, and more importantly I hope you can avoid the problem and get back to developing your apps.