Discord JavaScript Error – How I finally solved it in 1 step only

Total
0
Shares
Discord javascript error solution in one step

I was trying to install discord on my pc and a weird error occurred like – “A fatal javascript error occurred. Error: Cannot find module ‘discord_desktop_core’“. I tried multiple things, as suggested on multiple websites, but nothing worked.

Generally, these errors occur either due to corrupt installation or wrongly file flagged by antivirus. Here is a tweet where Avast confirms that sometimes files are wrongly flagged and Discord is a victim of that.

But there are some malwares and potentially dangerous apps in the market with the name of Discord. So you have to be careful about it. Always download the software from genuine websites only. Bitdefender found a fake Discord Npm package. Similarly, Malwarebytes also blocked discord’s cdn because they found some dangerous file in it. But the issue was resolved later.

The errors could be in many forms like –

A JavaScript error occurred in the main process: Uncaught Exception: Error: Object has been destroyed at MenuItem.click

A fatal javascript error occurred. Error: Cannot find module ‘./core’

There are many more error types but they all could be solved by following the provided steps in this article.

Solution – Reinstall Discord but with proper steps

With the change in OS updates, drivers, antivirus policies etc., sometimes already installed software breaks. This happens a lot with JavaScript based software because this language is a scripting language and it’s primary use is in web based software. But since Discord is developed using javascript, so we are facing these error and issues.

I hope you have tried multiple things and still the problem is not solved. But in this article you will get the exact solution for this discord problem. Some of my students told me about these problems and I guess you faced them too –

The action can’t be completed because the folder or a file is open in another program” while trying to delete discord folder from appdata or appdata/local.

Okay, let’s talk less and solve your discord issues without complicating things.

First of all, try to open this article in your mobile device because you will need to restart your computer in safemode.

Step 1 – Restart computer in safemode

We need to uninstall the current discord software. The best way is to enter into safemode of windows operating system. I will show the instructions for windows 10.

  1. Open your windows login screen.

  2. Press and hold shift key.

  3. Select Power Restart (while keep holding shift key).

    windows 10 Login screen with power options

  4. Your PC will restart now and you will get “Choose an Option” screen. Select Troubleshoot from that.

    windows choose an option troubleshoot

  5. Select Advanced Options.

    windows troubleshoot advanced options

  6. Now select Startup Settings and press Restart. (Note: Startup settings option could be at any position. Doesn’t mean it will be the last option. Sometimes I find it in 2nd place too.)

    windows advanced options startup settings

    startup settings restart screen

  7. You PC will restart and you will see the list where you can find Safe Mode options. Select Enable Safe Mode with Networking.

    startup safemode screen

Now you PC is in Safe Mode. It means you can easily uninstall Discord without having errors. Safe mode will look like this –

You can see there is Safe Mode written at all 4 corners of the screen. This indicates that you are in safemode.

Step 2: Uninstall Discord from Add or Remove Program Setting

Remove discord from your PC using Add or Remove program setting.

  1. From windows search bar, find “Add or Remove Program”.

    select add or remove program from start menu

  2. Locate Discord from the installed applications list.

    searching discord in add remove program list

  3. Click on Uninstall and remove it.

Step 3: Remove Discord directory from Local and Roaming folder of AppDir

Now we have to remove all the traces of discord from our pc. There are files in local and roaming folder which we need to delete.

  1. Open run utility by pressing windows key ( ) + R. Or searching run in start.

    open run from start menu

  2. Enter %appdata% and press OK

    find appdata from run utility

  3. Delete Discord folder

    delete discord from appdata roaming

  4. Again open run utility and enter %tempappdata% and press OK

    find localappdata from run utility

  5. Delete Discord folder from here too

    delete discord folder from appdata local

  6. Restart PC

Your PC will restart in normal mode now.

Step 4: Reinstall Discord

Now you can install the latest version of Discord from official website.

      I solved my discord javascript error ♥♥

Click here to Tweet this

Hope this solves your discord javascript error issue. If you are still getting the error then check if your antivirus is blocking the discord files. Whitelist it’s directory. The steps to do that is completely dependent on the antivirus you are using.

As a personal suggestion, you should always use MalwareBytes because I found it best in the market. It helps in removing virus, trojans, adwares, malwares, ransomwares and all the potentially dangerous applications. It also has free browser extension which will protect you from all dangerous websites. Also, it is very cheap and affordable.

You may also like –