Matthew James Davis
Matthew James Davis

Reputation: 12295

Aurelia Error: Potentially unhandled rejection [4] Unexpected token @

So, the docs for Aurelia were recently updated and now a lot of things were replaced with decorators, like @binding. When I try to use them, I get the error:

Potentially unhandled rejection [4] Unexpected token @ (WARNING: non-Error used)

I've run all forms of npm update but I still get the error. Thoughts?

Upvotes: 1

Views: 823

Answers (1)

Matthew James Davis
Matthew James Davis

Reputation: 12295

The issue here was that even though I kept running npm update, my config was instructing npm to fetch a 4.0.0 version of babel. Decorators were included in the babel 5.0.0 release. Therefore, I needed to make the following edit to my package.json file:

package.json

{
  ...
  "devDependencies": {
    "gulp-babel": "^5.0.0",
  }
}

Then, I ran npm update gulp-babel, npm fetched the correct packages, and everything worked correctly.

Upvotes: 1

Related Questions