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

1.1K
Visualizações
Google Sheets API resulting in "GoogleAuth is not a constructor" error in Node

I've been trying to set up a node application with the Google Sheets API, but when initializing as per the documentation I get the following error:

TypeError: google.auth.GoogleAuth is not a constructor

Using the below code:

const {google} = require('googleapis');

const auth = new google.auth.GoogleAuth({
    keyFile: 'credentials.json',
    scopes: ['https://www.googleapis.com/auth/spreadsheets']
});

I've tried looking everywhere but haven't been able to find a solution.

To clarify I have installed googleapis with npm in the project as well

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I had the same problem and updating the googleapis library fixed the issue. Run npm i googleapis@latest and try again.

over 4 years ago · Santiago Trujillo 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