Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

434
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda