Though ES7 features are experimental, many of us have already tried them using Babel 5. After upgrading to 6.x the following error can happen:

Decorators are not supported yet in 6.x pending proposal update

This post describes how to overcome this issue and explains why does it happen.

What’s happening?

Most likely you know that decorators proposal to ES7 is not finalized yet. It means that while feature is available and widely used, the way they work still can be changed. Because of it, Babel developers decided that decorators should not be available in the new 6.x version until proposal is finalized. It means that everyone who upgraded from Babel 5.x to Babel 6.x will encounter the error above.

How to solve the issue?

Obviously, there is a bunch of code that already utilizes such handy stuff as ES7 decorators. Not having it in Babel 6 made people downgrade to the 5.x, but luckily, there is a Babel 6 plugin called Transform Decorators Legacy by GitHub user loganfsmyth that can be found here.

Modify your .babelrc so it looks like this:

  "presets": <your_list_of_presets>,
  "plugins": "babel-plugin-transform-decorators-legacy"

More detailed information about the issue and the current status can be found at the Babel Phabricator