Warning after update from to .babelrc definitions please


Warning: unable to resolve “stage-3” in presets of /Users/seb/myapp/.babelrc
Warning: unable to resolve “transform-runtime”

Best to remove these definitions for

Tried to remove
"stage-3 and transform-runtime"

  "presets": ["es2015", "stage-3", "react"],
  "plugins": ["react-require", "babel-root-slash-import", "transform-runtime"]

to become

  "presets": ["es2015", "react"],
  "plugins": ["react-require", "babel-root-slash-import"]


But throwing all these


ReferenceError: FutureTasks is not defined

Tried to downgrade back to but now cannot?

$ meteor update --release

Now can’t even do that

$ meteor update --release
Update to release METEOR@ is impossible:
While selecting package versions:             
error: No version of mongo satisfies all constraints: @1.1.12, @=1.1.7
Constraints on package "mongo":
* mongo@1.1.12 <- top level
* mongo@=1.1.7 <- top level
* mongo@1.1.7 <- autoupdate 1.2.9 <- hot-code-push 1.0.4 <- meteor-base 1.0.4

This project is at the latest release which is compatible with your current package constraints.


babel-root-slash-plugin is incompatible with Meteor. It affects how how importing from absolute ("/") paths are handled, transforming them to be relative to your project root. Since Meteor does this already, using the plugin inside of Meteor effectively does this twice, munging the path and breaking your app. Remove it :slight_smile:

You can also remove es2015 and react, since Meteor includes both for you (and thinks like the correct runtime transforms, etc). Other stages/presets/plugins should be ok.


So now it is:

  "presets": ["stage-3"],
  "plugins": ["react-require", "transform-runtime"]

Warning: unable to resolve “stage-3” in presets of /Users/seb/spark2acs/.babelrc
Warning: unable to resolve “transform-runtime” in plugins of /Users/seb/spark2acs/.babelrc

So remove these too?


You don’t want transform-runtime, but for anything else that doesn’t resolve, just install it:

$ meteor npm install --save-dev babel-preset-stage-3

(or a prefix of babel-plugin- for plugins…)

I guess it’s not so obvious what Meteor gives you and doesn’t… but as a kind of rule of thumb, the basic stuff (es2015, which runtime to use, etc) is all handled by Meteor, and anything “extra”, you need to choose yourself.

P.S. It sounds like you don’t really need stage-3, and that your .babelrc was left over from somewhere else (maybe from the testing infrastructure of mantra from before Meteor core added testing?). If you don’t need it, don’t add/use it. The best .babelrc for Meteor, unless you know otherwise, is just {} :slight_smile: