Please try the following:
1) Open Control Panel > Uninstall a program
2) Locate latest Microsoft Visual C++ (64bit) and click on Change (If you're using 64 bit version of Teams, maybe you need x86)
3) Click on Repair
4) Enter your Admin credentials to perform repair
5) Once repaired Launch Teams app to make sure it works
Cited from https://techcommunity.microsoft.com/t5/microsoft-teams/windows-a-javascript-error-occurred-in-the-main-process/m-p/1417805 (by d112296a)
If this is helpful please accept answer.