Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

425
Views
Vue CLI npm run build throws Syntax Error: Unexpected token - but code looks fine

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.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

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();
  }
about 4 years ago · Juan Pablo Isaza Report

0

NOTE: This is not the issue, see the comment, using Vuex functions, so don't need parenthesis

const theAttendees = await groupsModule.attendeesFromGroups(); <-- missing paranthesis
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!