How to fix JavaScript Error in Discord

As Discord becomes more and more popular, we are definitely seeing a rise in the number of people having issues installing the program itself. This could be down to the huge number of individual setups out in the wild and the fact that it is simply impossible for the programmers to bug test every single situation.

A lot of the problems seem to be arising from a rogue JavaScript error. JavaScript exists in many forms and versions across a variety of machines and if yours isn’t kept up to date, or something has got corrupted at some point in time, then when it comes to installing Discord, this could throw up an infuriating problem that is seemingly impossible to get past.

Not so, let’s fix her right up and get you on your way to a fully installed version of Discord, running like a dream.

Delete old Discord Files

If you have had a failed installation already, chance are Discord will have left some waste behind it in the form of temporary files lurking in the depths of your PCs file structure.

We need to get rid of those to ensure there won’t be an issue either now or in the future.

Let’s get rid of them now.

Hit CTRL+ALT+DEL to bring up your task Manager in Windows. Close Discord from here.


Right-Click on the Windows Start icon (bottom left corner) and select RUN from the menu that appears here. A dialogue box will magically appear before your very eyes.


Type in the following (or just copy it from here, but make sure you get it right with the symbols included:-


Now click Run. This command will speed you off to your App Data folder and you should now see a window containing several folders, one of which will conveniently be called Discord.


We need to say adios to this bad boy and its contents, to right-click it and delete it. You can empty your Trash can for good measure. Bye-bye corrupted files. See you in the next life.

Now we need to go back to the Windows Start icon and right click it again and, once more, select the RUN option.

We need to head off to a different folder this time so you need to enter the below command into the box this time:-


You guessed it, there is another Discord folder lurking within the window that appears and we need to dispatch it to the bin in exactly the same manner as the last folder that crossed our path.

Now, if we cross our fingers and pray to the Gods of PC software installation you may well have just fixed your problem with installing discord.

Corrupted install files are the major reason for the JavaScript error so at this point it is well worth trying to Install Discord once more and see if that has fixed the issue. If it has, you’re welcome, but if not you need to repeat the above steps and then try some of these other possibilities to see if we can get you up and running.

Is Your Anti-Virus Causing Problems With Your Discord Installation?

Ah, another day, another PC problem caused by anti-virus software rather than it just doing what it’s supposed to!

Generally, if you’re still having problems you need to let Discord bypass your anti-virus program. This is achieved in more or less the same manner on each, but just be aware, depending on what anti-virus software you have, the steps may be slightly different.


You could also just disable your anti-virus completely while you install Discord. We don’t really recommend leaving your PC unguarded for any length of time but for the 30 seconds or so it takes for a perfect install you should be fine. However, if you want to follow our example of adding a bypass to Avast Anti-Virus then read on.

Open Avast Anti-Virus (if you are using a different program, do that too, from here we will just be using Avast as the example but follow along as best you can.)

Open the PROTECTION tab.

Locate the Virus Chest (this is generally called something like Quarantine in other programs so look out for that too)

Here you will a list of the programs your Avast has decided helpfully that aren’t safe. Fine when it works, less so when it makes mistakes.

Now you should be looking for anything that looks associated with Discord. Handily, they will all have Discord in the name.

Highlight the files with Discord in the name and select Restore and Add Exception. 

Once you have done this, try again to reinstall Discord. Now your anti-virus isn’t acting like an angry Doorman, you might just find it installs perfectly.

You can also add folders that Avast shouldn’t look to clamp down on, say for example you have a specific folder where you install downloaded files from. You can Add an Exception to this folder so it remains out of Avast’s clutches. 

Be wary with this however as not everything you download from the internet may always be safe from infection.

Re-install Discord

Make sure that you re-install Discord on a system that has had all the temporary files removed as we walked you through at the beginning of this article.

For peace of mind it may even be worth downloading the installer again, just to rule out any corruption on the file currently on your hard drive.

And That’s That

The good news is you should now have a full-functioning Discord installation. The vast majority of issues with its installation are covered with the steps above and we would be surprised if it’s not fixed it for you.

Now you can enjoy using one of the most popular online communication tools of the moment.