Getting A Javascript Error On Discord? Here’s The Fix

Are you burdened with annoying hurdles trying to install Discord, specifically a particularly pesky javascript error? You’re not alone, but not to worry as we’ve got the solution to get Discord installed and running in no time. Here’s how to fix the javascript error on Discord.

Delete Discord Files in localappdata & appdata

Discord Installation Has Failed

Discord continuously stores temporary data on the PC that helps it run as it should, or in our case, causes errors to crop up. To give Discord a clear run at booting up without the javascript error or any other problem for that matter, we need to delete these files. Follow the steps below.

  1. To start, close Discord via the Task Manager (right-click on the Taskbar and select ‘’Task Manager’’ then select the Discord process and click on ‘’End Task’’).
  2. Next, right-click on the Windows start menu icon in the bottom left-hand corner of the desktop.
  3. In the contextual menu that appears, select ”Run”.
  4. In the small ”Run” window in the bottom left-hand corner, enter ”%appdata%” into the empty field and click on the ”Run” button below.
  5. In the Windows Explorer window that opens, locate the folder named ”Discord”. Right-click on the folder, and click ”Delete” in the contextual list.
  6. Return to the Start menu and load up ‘’Run’’ once more.
  7. Type ‘’%localappdata%’’ in the field and hit ‘’Run’’.
  8. Find the ‘’Discord’’ folder and delete as above by right-clicking on it then selecting ‘’Delete’’.
  9. Relaunch the Discord setup file and follow the steps provided by the installation wizard.

Whitelist Discord Installation Files In Antivirus Software

A handful of antivirus apps are known to target specific Discord installation files and effectively quarantine them during installation, meaning Discord is unable to access them to complete the process, which causes the javascript error message. One file that is commonly flagged as potentially dangerous by antivirus software is the ‘’discord_voice’’ application specific approximate recovery file.

To bypass an overeager antivirus, we need to whitelist the files it is picking up and quarantining. The process differs from software to software, so we are using the ever popular – and free – Avast antivirus for the sake of providing a concrete example.

  1. Open up Avast by right-clicking on the Avast icon in the system tray and selecting ”Open Avast user interface” from the list that appears.
  2. Once open, click on the ”Protection” section among the options running down the left of the Avast window.
    Discord Update Failed
  3. Click on ”Virus Chest” to the right. Any quarantined files show up here.
  4. Locate any files associated with Discord, easily identifiable because they start with ”discord_” or a similar variant in most cases.
    Discord Installation Failed
  5. Click on the three dots that appear when hovering over the files and select ”Restore and add exception” from the contextual list.
  6. Do this for each of the files.
  7. Restart the Discord installation process.

To make sure not to encounter any potential future issues or if you’ve yet to install Discord, we need to add the folder containing the Discord setup executable as an exception in Avast. Doing so means the installation process can complete uninterrupted without any files being unexpectedly sentenced to the Avast Virus Chest quarantine.

  1. Open up Avast as above.
  2. Click on the ”Menu” icon among the options in the top right of the Avast window and select ”Settings” from the drop-down list.
  3. Click the ”General” section on the left.
  4. Under General, select ”Exceptions” from the options on the left.
    How To Uninstall Discord
  5. Click ”Add Exception” and type in/browse to the location of the folder containing the Discord installer.
  6. Click ”Add Exception”.
  7. Launch the Discord setup executable.

Uninstall & Reinstall Discord

With Discord installed, the javascript error can occasionally happen, in which case uninstalling and reinstalling the application is the best course of action. As well as running Windows 10’s inbuilt uninstall utility, we also need to delete any remaining files to allow for a fresh install.

  1. To start, right-click on the Windows Start menu icon and select ‘’Search’’ from the drop-down menu.
  2. In the search field, type ‘’Control Panel’’ then click on the first result of the same name in the result field above.
    Discord Download Error
  3. In the Control Panel, click on the highlighted ‘’Uninstall a program’’ text located just below the ‘’Programs’’ icon.
  4. Find Discord among the list of programs, click on it and then click the ‘’Uninstall’’ button at the top of the list.
    Discord Not Installing
  5. Once uninstalled, right-click on the Start menu and select ‘’Run’’.
  6. Type ‘’%appdata%’’ and click ‘’Run’’.
  7. Find the Discord folder and delete it.
  8. Open up ‘’Run’’ once more, search for ‘’%localappdata%’’ and delete the Discord folder.
  9. Visit the Discord website and download the latest version of the app here.
  10. Double-click on the downloaded executable file and follow the steps of the installation wizard.
  11. When finished, launch Discord and the javascript should no longer disrupt the process.

You Might Also Be Interested In These