When any file of any app is corrupted then a JavaScript error occurs. Also, sometimes antivirus blocks the files of any app and they show JavaScript errors.