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

127
Visualizações
Problem with parsing eslint for async function

I have problem with my ESLint parser. I use Sage project from Roots.io I've been searching the internet all day. I use Webpack and my terminal print:

Module build failed: 
19 :     redirect_uri: redirectUri,
20 : });
21 : 
22 : 
23 : async function getAsyncAuth() { 
           ^
Unexpected token (23:6)

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

These comments like eslint-disable still not work!

My .eslintrc.js

  'ecmaVersion': 2017,
  'sourceType': 'module',

I changed ecmaVersion from '2016' to '2017', '2018' or 'latest' but still not working.

In package.json I have in devDependencies:

"eslint": "~4.19.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.14.0",

My script where I use async/await.

    import axios from 'axios';
    import oauth from 'axios-oauth-client';
    
    var clientId = '';
    var clientSecret = '';
    var redirectUri = '';
    
    const getAuthorizationCode = oauth.client(axios.create(), {
        url: 'https://api.getbase.com/oauth2/authorize',
        response_type: 'code',
        client_id: clientId,
        client_secret: clientSecret,
        redirect_uri: redirectUri,
    });
    
    
    async function getAsyncAuth() { 
        const auth = await getAuthorizationCode();
        console.log(auth);
        return auth;
    }
    
    getAsyncAuth();

What it's wrong? Do you know solution?

about 4 years ago · Juan Pablo Isaza
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