Discord is streamlined and easy to navigate, but errors can still occur occasionally. This can be really disruptive, especially if you were planning to chat with your friends or work together with your classmates.
Sometimes, a JavaScript error appears while either installing the Discord application or trying to launch it.
You can repair this in several diverse ways, but you might need to try multiple solutions to fully resolve the issue.
Table of ContentsShow
Installation JavaScript Error
If you are having trouble installing the Discord application, here is what you need to do.
Fix 1: Redownload Discord
The most common explanation for Discord’s installation causing a JavaScript error is that the install file itself is corrupted. This usually occurs when something goes wrong during the download.
To determine if this is the problem, simply re-download the setup file from the official Discord website and try to install it again.
If you still see the same mistake, your anti-virus might be blocking you from accessing the file.
Fix 2: Make an Anti-Virus Exclusion
Anti-malware software on your computer could be the cause of this JavaScript error. To prevent this from occurring, you need to add an exemption to your anti-malware program.
Here’s how to do that while using Windows Security (previously Windows Defender):
- Search for and open Windows Security from the Start Menu
- On the left side of the window, select Virus & threat protection
- Under Virus & threat protection settings, select Manage settings
- Scroll down to find Add or remove exclusions
- Click Add an exclusion and choose File
- Go to your download folder and select DiscordSetup.exe.
Instead, during step 5, you have the option to omit your complete download folder and bypass step 6.
If you’ve followed each step of this process correctly, the Discord setup is now excluded from your anti-virus software, and you should be able to install it.
Keep in mind that every anti-virus software has a different method for adding exclusions. You can use the guide on the official website of your anti-virus to find out how to add an exclusion.
Discord Launch JavaScript Error
If you see a JavaScript Error while launching Discord, try these fixes:
Fix 1: Delete Roaming and Localappdata Cache
Windows constantly caches files in the Roaming and Localappdata folders to keep programs and apps running quickly and smoothly. Discord, like any other application, stores temporary data in these two folders.
In time, some of that data can become corrupted, causing a JavaScript error when trying to launch Discord.
To resolve the problem, you might need to clean your computer of those cache files.
- Close Discord completely, either from the Tray Icon on the taskbar or through Task Manager.
- Press Win + R, type %appdata%, and click run.
- This will take you to the Roaming folder, where you need to find the Discord folder and delete it.
- Press Alt + Up Arrow. You will be taken into App Data. Open the Local folder.
- Again, find the Discord folder and delete it.
- Run Discord.
If you have followed every step of this fix, you should no longer receive the JavaScript error.
Fix 2: Reinstall Discord
Removing the cache and temporary files has a similar effect to reinstalling the application. If doing so fails to make a difference, you should try completely reinstalling Discord.
- Open the Start Menu, type Remove Programs then open it
- From here, find the Discord app and then select Uninstall
- While uninstalling, visit the official Discord website and re-download the setup file
- Open the setup file and complete the installation process.
By following this guide and attempting each of these handy fixes, you should effectively eliminate the issues you are having with Discord, including the JavaScript error!