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

148
Vistas
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 Respuestas
Responde la pregunta

0

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

{
  "globals": {
    "globalThis": false,
   }
}
about 4 years ago · Juan Pablo Isaza Denunciar
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