I am getting the following error when I try to npm run build my Vue app:
Syntax Error: Unexpected token (559:18)
557 | async, allGroups(), {
558 | const: theAttendees = await groupsModule.attendeesFromGroups,
> 559 | this: .currentAttendees.push(theAttendees)
| ^
560 | }, async, logout(err), {
561 | alert() { }
562 | } `Logout err : ${err}`);
The code in the error makes no sense to me with all the commas after everything, the const: and this:, and especially the alert() { } which doesn't reflect what the code is at all.
This is what the code itself looks like. I cannot see anything wrong.
async allGroups() {
const theAttendees = await groupsModule.attendeesFromGroups
this.currentAttendees.push(theAttendees)
}
async logout(err){
alert(`Logout err : ${err}`)
console.log('DASHBOARD: logout')
await userModule.logout();
}
If anyone has any ideas what this syntax error actually is referring to I'd be very grateful for the help.
You might be missing comma after the function allGroups() ends your code will be like
async allGroups() {
const theAttendees = await groupsModule.attendeesFromGroups();
this.currentAttendees.push(theAttendees)
},
async logout(err){
alert(`Logout err : ${err}`)
console.log('DASHBOARD: logout')
await userModule.logout();
}
NOTE: This is not the issue, see the comment, using Vuex functions, so don't need parenthesis
const theAttendees = await groupsModule.attendeesFromGroups(); <-- missing paranthesis