Tech Pro Line

Discord JavaScript Error

Do you get a JavaScript error every time you try to install discord on your Windows 10 PC? We will be discussing the JavaScript error, why does it happen, how to solve it & how to avoid it next time you install discord. “A JavaScript error occurred in the main process” usually appears when you start discord or it auto loads after windows boot. The error does show some information in the dialog box but this information can be hardly understood by a regular user. This issue seems to be popping up regularly as discord developers haven’t tried to fix it. To understand how this error happens, which specific function in your computer causes it & how to solve it through multiple solutions, we’ve created a simple step-by-step tutorial on how you should tackle this “Discord JavaScript Error”.

Why does the JavaScript error occur?

Up until now, there aren’t many determined cases known for this error. Some say that the discord app files have gone corrupt or some native window service is disabled, creating hindrance for the installation & execution of discord. Or your antivirus program might be causing some important files to be removed by flagging them as malware (Most antivirus programs flag files from unknown sources as malware). Or it could be a simple problem that you aren’t running discord via the proper administered allowed method. So I’m going to list some causes;

  • Antivirus
  • Corrupt discord files
  • Outdated version of discord
  • Windows Audio Video Service


There are multiple fixes for this error & its similar types. All these fixes are very easy & can be done by yourself without any professional help.

Here are the easiest ways to fix the “Discord JavaScript Error”;

Fix #1 Delete discord app files & data.

Discord is a program that helps you connect to your friends instantaneously & share your game. For this, it has to continuously save data & create data pools on your PC. This data isn’t deleted when discord is closed. When the discord app is run next time all this temporary data is parsed creating difficulties in booting discord. To provide discord a clear & error-less boot, we have to manually delete these files. To delete these files, simply follow the steps given below.

  • Close discord from the root. To perform this operation, right-click on the taskbar & select “Task Manager”.
  • Select the processes tab & scroll down until you find Discord.
  • Right-click on the Discord App icon & then select “End Task”
  • After ending discord, right click on the start button on the bottom left of your screen.
  • Select “Run”.
  • You can alternatively open run by pressing the “Windows key” with “R” on your keyboard
  • Write “%appdata%” in the Run dialog box.
  • Click the run button or press enter.
  • A window will open, locate the folder with the name discord.
  • Right-click on it & click delete.
  • Right-click on the start menu & click run again.
  • Enter “%localappdata%” in the dialog box & press run.
  • Locate the Discord folder in the window that pops up.
  • Right-click on it & delete.
  • The next step is to go to and download the latest version.
  • Install discord app again.

Fix #2 Allowing discord files through your antivirus.

If you have your privacy & protection settings cranked at high, then there might be a good chance that your antivirus might be deleting or quarantining some files which are essential to the booting or installation of the discord app. “Discord_voice” is a file that commonly gets deleted or quarantined by most antiviruses including the Microsoft defender, which is native to windows & AVAST advanced security.

To get through the AVAST quarantine follow the following steps

  • Open the AVAST panel by right-clicking on the AVAST icon in the system tray which is on the bottom right corner of your screen, just by the system clock.
  • Go to the protection menu by clicking the “Protection” tab among the other options provided by AVAST
  • You will see a “Virus Chest” tab, here is where AVAST keeps its quarantined files.
  • Locate any file associated with the name “Discord”. These files were mostly starting with “discord_” or “ds-” constants.
  • Right-click on the file or click on the three dots.
  • Select the option “Restore & add an exception” from the dropdown menu which appears.
  • Start the discord installation process again.
  • Or go to and download the latest version.
  • Install discord again

To get through Microsoft Windows Defender, follow the stated steps.

  • Go to the start menu & search for Windows security. Or you can click the shield icon in your icon tray which is in the bottom right corner of your desktop.
  • Navigate to the homepage, by going through tabs on the left-hand side of the screen.
  • Select “Virus & Threat Protection”.
  • Locate the “Virus & Threat Protection Settings”, & click on manage settings.
  • Turn off all the toggle buttons on the on position (temporarily)
  • Now start your discord installation again.
  • Or go to & download the latest version of discord.

Hopefully, the error should’ve gone by now. If the error persists, follow the next solution.

Fix #3 Uninstalling & Reinstalling Discord

The oldest solution in the tech industry is to turn a machine off & then start it again. This might seem a bit old school but it is a great solution sometimes. Here are the following steps to uninstall & then install discord again.

  • Click on the start menu button in the bottom left corner of your desktop.
  • Search “Control Panel” in the search bar.
  • Open the control panel & then go to the programs section.
  • Under the program section, you’ll find the “Uninstall” option.
  • Click on uninstall, a program window will open with all your installed programs.
  • Right-click on discord & select “Remove” from the dropdown menu.
  • Wait for the program to completely uninstall, it might take some time depending on your computer specs.
  • After uninstalling go to  
  • On the discord website, locate the “Download” button.
  • Select download for windows.
  • The setup file will download.
  • Disable your antivirus (This step is necessary for uninterrupted install.
  • Run the setup as administrator.
  • Wait for Discord to install.
  • Enjoy (Remember to activate your antivirus)

Fix #4 Enabling Administrator Access

This might feel a little basic, but it is important while downloading any application. Granting administrator access is very important as it allows discord to install without any problem.

  • The first & simple way is to right-click on the discord setup.
  • Select “Run as administrator” from the drop-down menu.

This will do the work but it’s not permanent. 

  • For the permanent solution right-click the discord application.
  • Select properties from the drop-down menu.
  • Go to the compatibility tab once the properties menu is visible.
  • Select “Run This Program as Administrator”.
  • Select apply & then ok.

Once the discord JavaScript error is fixed on your computer. You can start taking advantage of all the discord features.

Frequently Asked Questions (FAQ)

Here are some frequently asked questions which might help you get through the discord JavaScript error.


Discord gives the JavaScript error when some of its main files are corrupted. In order to provide discord with a clean boot, you might have to delete these files or uninstall & install discord again.


There are two types of errors, syntax error & runtime error. The JavaScript error regarding discord is the runtime error, where the application doesn’t find the required file (Which are corrupted) on runtime.


Some of discord’s settings or files might have gone corrupted which may give a JavaScript error on runtime. This is easily fixed by following the fixes provided above.


Discord has a default setting where it starts automatically when windows boot up. When discord files are corrupted it will give a JavaScript error on Windows startup. You can disable auto startup or you can solve the discord JavaScript error by following the fixes above.

Leave a Reply

Your email address will not be published.