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?