Are you struggling to install Discord because you’re encountering a number of obstacles? Maybe an annoying javascript error?
It’s not a problem as we’ve got a solution so we can get Discord up and running quickly. Here’s how to fix the JavaScript error on Discord the easiest way ever. Let’s begin by fixing the first error.
Discord JavaScript Error
How to Fix the A Discord JavaScript Error?
Delete Discord Files In Localappdata & Appdata
Discord continuously stores temporary data on the PC, which either makes it run correctly or, as it was in our case, causes errors. Ideally, we would like to remove these files so that Discord will boot up without the Javascript problem or any other. Please follow the instructions below.
- In order to close Discord, first access the Task Manager (right-click the Taskbar, select ‘Task Manager’, and then select Discord and click on ‘End Task’).
- To access the Windows start menu, right-click the Windows icon located in the bottom left corner of the desktop.
- Select ‘Run’ from the relevant contextual menu.
- In the small ”Run” window in the bottom left-hand corner, enter ”%appdata%” into the empty field and click on the ”Run” button below.
- Locate the folder named “Discord” in the Windows Explorer window that opens. Right-click the folder and choose “Delete” from the contextual menu.
- Go back to the Start menu and run ”Run” once more.
- Put ”%localappdata%” into the field and click ”Run”.
- By right-clicking on the folder and selecting ”Delete” you can delete the ”Discord” folder.
- Launch the Discord setup file again and follow the directions provided by the installation wizard.
Adding Discord installation files to your anti-virus software
Many antivirus programs target specific Discord installation files and effectively quarantine them during installation, which prevents Discord from accessing them, which causes the javascript error message.
Virus software tends to flag as potentially dangerous the approximate recovery file ‘discord_voice’, which is application-specific. The best way to bypass an overeager antivirus is to whitelist the files it is picking up and quarantining.
Using the popular free Avast antivirus as an example, we will illustrate how the process varies from application to application.
- The Avast user interface can be accessed by right-clicking the Avast icon in the system tray and selecting “Open Avast user interface”.
- From the left-hand side of the Avast window, click on the “Protection” option.
- Click on ”Virus Chest” to the right. It will show any quarantined files.
- Discord-related files can usually be identified with a start of ‘discord_’ (or a very similar variant) or a similar name.
- Select “Restore and add an exception” from the contextual list when you hover over the files.
- Do this for each of the files.
- Restart the Discord installation process.
In order to prevent future issues or if you haven’t installed Discord yet, you will need to add the Avast exception for the folder containing the Discord setup executable. In this case, Avast Virus Chest will not unexpectedly quarantine any files during the installation process.
- Open up Avast as above.
- Select “Settings” from the drop-down list in the top right corner of the Avast window by clicking on the “Menu” icon.
- Click the ”General” section on the left.
- Choose Exceptions from the options on the left under General.
- Select “Add Exception” and browse to the folder containing the Discord installer.
- Click ”Add Exception.”
- Launch the Discord setup executable.
Uninstall & Reinstall Discord
It is possible to encounter the javascript error while using Discord, in which case you will need to reinstall it. To allow for a fresh installation of Windows 10, we need to run the built-in uninstaller and ensure no remaining files are left behind.
- Start by right-clicking the Start menu icon and then selecting ‘Search’ from the drop-down menu.
- Enter ‘Control Panel’ in the search field and click the first result of the same name in the result field above.
- Select the highlighted text that reads ”Uninstall a program” below the ”Programs” icon in the Control Panel.
- Choose Discord from the list of programs, click ”Uninstall” at the top, and it will be removed.
- Once uninstalled, right-click on the Start menu and select ‘’Run’’.
- Type ‘’%appdata%’’ and click ‘’Run’’.
- Find the Discord folder and delete it.
- Open up ‘’Run’’ once more, search for ‘’%localappdata%’’, and delete the Discord folder.
- Install the latest Discord version by going to the Discord website.
- Follow the steps of the installation wizard after you have double-clicked the downloaded executable file.
- If Discord is launched after the javascript has been generated, then the process should no longer be disrupted.
And that’s about it. I hope these fixes will prevent you from ever having to deal with a Javascript error on Discord ever again.