Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda