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

145
Visualizações
globalThis not defined after git hiccup

I have been working on a web app in React. I was following this guide.

In order to execute Python code in the app, and I was able to get it successfully working.

However, I went to git add * and forgot I hadn't yet added a gitignore, so it added the node_modules and package/lock files.

Idioticly, I did git -rm * and it deleted everything, but I still had my relevant code windows open so I just saved those and then added back react scripts/yarn install etc.

Eventually I got it running but started getting the error:

'globalThis' is not defined  no-undef

I tried looking online but most issues revolved around outdated Node versions. My Node is v16.13.1, plus I just had it working so clearly this was not the issue.

I even created an entirely new React project and copied over my code, but I still run into the same error. I tried npm install globalthis and yarn add globalthis, tried restarting my computer, and even tried re-installing node but the issue persists.

I am at a total loss for what to do. I know the issue is not with my code because it was it was working previously before the git mistake.

Anybody have any suggestions?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Try to add this to your eslint config. (This might be helpful)

{
  "globals": {
    "globalThis": false,
   }
}
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