When you try to launch Discord, a pop-up window may appear with the message ‘A Fatal JavaScript Error Has Occurred. Cannot continue.’ This error prevents Discord from opening at all. The problem is usually caused by corrupted cache files, a damaged installation, or conflicts with system-level JavaScript settings. This article explains why the error occurs and provides step-by-step fixes to get Discord running again.
Key Takeaways: Discord Fatal JavaScript Error Fixes
- Delete Discord cache folders: Remove corrupted cached data from %appdata%\discord and %localappdata%\discord.
- Clear Discord’s GPU cache: Delete the ‘GPUCache’ folder inside the Discord cache directory to fix rendering errors.
- Reinstall Discord with the installer: Run the official DiscordSetup.exe after uninstalling to replace all damaged files.
Why the Fatal JavaScript Error Occurs in Discord
Discord is built on Electron, a framework that uses Chromium and Node.js to render the app. When JavaScript code inside Discord fails to load or execute, Electron throws a fatal error and stops the process. The most common root causes are:
Corrupted cache files. Discord stores temporary data in two folders under your user profile. If these files become damaged due to a power loss, disk error, or incomplete update, the JavaScript engine cannot read them and crashes.
Damaged installation files. A partial update or antivirus quarantine can delete or corrupt Discord’s core JavaScript files. When the app tries to load these missing or broken files, the fatal error appears.
Conflicting system settings. Some Windows security features, such as Controlled Folder Access or third-party antivirus real-time scanning, can block Discord from writing or reading its cache. This interference can cause JavaScript runtime errors.
Outdated or incompatible GPU drivers. Discord uses hardware acceleration to render its interface. If your graphics driver is outdated or incompatible, the JavaScript rendering pipeline may fail.
Steps to Fix ‘A Fatal JavaScript Error Has Occurred’ in Discord
Perform these steps in the order shown. Test Discord after each step. If the error persists, move to the next fix.
Method 1: Delete Discord Cache Folders
- Close Discord completely
Press Ctrl+Shift+Escape to open Task Manager. Look for any Discord processes under the Processes tab. Right-click each Discord process and select End task. Ensure no Discord icon remains in the system tray. - Open the Run dialog
Press Windows key + R to open the Run box. Type%appdata%and press Enter. This opens the AppData\Roaming folder. - Locate and delete the Discord folder
Find the folder named discord (not discordcanary or discordptb). Right-click it and select Delete. Confirm if prompted. - Delete the local Discord cache folder
Press Windows key + R again. Type%localappdata%and press Enter. Find the discord folder in this directory. Right-click and delete it. - Restart Discord
Launch Discord from the Start menu or desktop shortcut. The app will recreate its cache folders. If the error is gone, the fix is complete.
Method 2: Delete the GPU Cache Folder
- Open the Discord cache directory
Press Windows key + R, type%appdata%\discord, and press Enter. - Find the GPUCache folder
Inside the discord folder, locate the folder named GPUCache. This folder stores cached GPU data used by Discord’s hardware acceleration. - Delete the GPUCache folder
Right-click the GPUCache folder and select Delete. You do not need to delete the entire discord cache — only this folder. - Launch Discord
Open Discord. The app will generate a new GPUCache folder. If the error was caused by corrupted GPU cache data, Discord should now start normally.
Method 3: Reinstall Discord
- Uninstall Discord
Press Windows key + I to open Settings. Go to Apps > Installed apps. Find Discord in the list, click the three dots, and select Uninstall. Confirm the uninstallation. - Delete leftover Discord folders
After uninstalling, press Windows key + R, type%appdata%, and press Enter. Delete the discord folder if it still exists. Repeat for%localappdata%and delete the discord folder there as well. - Download the latest Discord installer
Open your web browser and go to the official Discord download page at discord.com/download. Click the Download for Windows button. - Run the installer
Locate the downloaded DiscordSetup.exe file and double-click it. Follow the on-screen instructions. Discord will install and launch automatically.
Method 4: Disable Hardware Acceleration via Command Line
- Create a Discord shortcut
If you do not have a desktop shortcut, right-click the Start menu, select Search, type Discord, right-click the Discord app, and select Open file location. Right-click the Discord shortcut and select Send to > Desktop. - Edit the shortcut properties
Right-click the Discord desktop shortcut and select Properties. In the Target field, place your cursor at the end of the existing text. Add a space followed by--disable-gpu. The full target should look like:"C:\Users\YourName\AppData\Local\Discord\app-1.0.9016\Discord.exe" --disable-gpu - Launch Discord with the modified shortcut
Double-click the shortcut to start Discord. The –disable-gpu flag turns off hardware acceleration. If Discord opens, the error was caused by GPU-related JavaScript issues. - Turn off hardware acceleration permanently
Once Discord is open, click the gear icon (User Settings) at the bottom left. Go to Advanced under App Settings. Toggle Hardware Acceleration to the off position. Click Okay to confirm. Close Discord and relaunch it without the –disable-gpu flag.
If Discord Still Shows the Fatal JavaScript Error
Error Appears After a Windows Update
A recent Windows update may have changed system policies that affect Discord. Run the Discord installer again in repair mode. Download the DiscordSetup.exe file, run it, and select Repair when prompted. This reinstalls Discord’s core files without affecting your user data.
Antivirus Blocks Discord Cache
Windows Defender or third-party antivirus software can quarantine Discord cache files. Open Windows Security, go to Virus & threat protection, and click Protection history. Look for any actions taken against Discord files. If found, click Restore. Then add Discord to the exclusion list: go to Virus & threat protection settings > Manage settings > Exclusions > Add or remove exclusions. Add the Discord installation folder (typically C:\Users\YourName\AppData\Local\Discord).
Error Only Occurs on a Specific User Account
If Discord works on a different Windows user account but fails on yours, the problem is likely a corrupted user profile cache. Log into the working account, download Discord, and use it from there. Alternatively, create a new Windows user account and install Discord under that account.
Discord Cache Deletion Methods: Manual vs Reinstall
| Item | Manual Cache Deletion | Complete Reinstall |
|---|---|---|
| Steps required | Close Discord, delete two folders, restart | Uninstall, delete leftover folders, download installer, run setup |
| Data preserved | All user settings and login sessions remain intact | All local data is erased; login required again |
| Effectiveness | Fixes most cache-related JavaScript errors | Fixes corrupted installation files and registry issues |
| Time required | 2 to 3 minutes | 5 to 10 minutes |
| Risk of data loss | None | Low — server settings and messages are stored on Discord servers |
You now have four methods to fix the ‘A Fatal JavaScript Error Has Occurred’ message in Discord. Start with deleting the cache folders, as this resolves the majority of cases. If the error persists, reinstall Discord completely. After Discord is working, consider adding the --disable-gpu flag to your shortcut as a permanent workaround if hardware acceleration continues to cause issues.