Home

Issue: 2612

Async/Await not working since v1.0.0

[issue link]

Hi!

I’ve tried updating my RC11 nuxt.js project to V1.1.1, but it failed with some packages, so I decided to start fresh.

Initialized a new project via vue init nuxt-community/starter-template

Everything went fine up till’ I tried using async/await in the store, later in methods.

I’m getting the following error everytime:

Parsing error: Unexpected token FUNCTION_NAME

This happens both in store and in components/pages.

Here’s my stores action:

export const actions = {
  async reset ({ dispatch, commit }) {
    commit('SET_USER', null)
    await dispatch('updateToken', null)
  }
}

which gives the following error:

Parsing error: Unexpected token reset

I’m using the latest node version btw, V9.4.0

Thanks in advance!

This question is available on Nuxt.js community (#c2273)