Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
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 answers
Answer question

0

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

{
  "globals": {
    "globalThis": false,
   }
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!