The “Error: Cannot find module” appears when you try to open the Discord app. It prevents the gamers from using the VoIP services and joining the servers. Try to fix this problem at the earliest possible to access this messaging platform.
Moreover, corrupted system files could prevent you from using the application. An antivirus program might cause issues accessing Discord from an unsecured browser. Use a reliable web browser and use this digital platform without hassle.
This error message might appear if “pnpm” is enabled for the Discord project. And, you can also face this problem when using a corrupted Discord app. Sometimes the temporary Discord files could block you from restarting the app. Remove them from the Windows 10/11 device to use Discord without further issues.
Run the app without Administrator Privileges
Many users reported that running the app without administrator permissions resolves the problem. And, whenever you try to run it as an administrator, the “cannot find module” issue might occur. Thus, open the Windows device, and locate the Discord icon from the desktop.
Right-click on it, choose “Properties”, and move towards “Compatibility”. Can you see the Run compatibility troubleshooter option? Select that and navigate to the “Settings” section afterwards.
Look for running this program as an administrator and remove the tick from its checkbox. Click “Ok” and tap on “Apply to save the Discord app permission changes.
Delete the Discord folders from AppData and Local AppData
Go to the Windows taskbar, tap on “File Explorer”, and select “View”. Head towards the “Hidden Items” section to get the hidden Discord files. Then, move to the location bar and write “C:\Users\YOURUSERNAME\AppData\Discord”.
Find Discord from the AppData folder, right-click on it and choose “Delete”. Close the AppData window once done and open the Start menu. Select “Run” from the built-in Windows tool list. Write “%localappdata% in the Run box, and hit the Enter key afterwards.
Close all the Discord Processes
Press the Windows and X keys simultaneously, and choose “Task Manager” from the pop-up menu. Navigate to “Processes”, and find Discord from the app list. Right-click on it and choose “End Process” to close all the Discord processes.
Enable Pnpm on Discord
Discord users should enable “pnpm” to fix this Discord error. Open the app, go to the project page and right-click on it to choose “Properties”. Tap on “Discord Rich Presence” and head towards the “Display” section. Write the project name and write the “enable-pnpm” command line.
And, Lastly, Uninstall and Reinstall Discord
Open a web browser and write “Discord” in the address bar. Access Discord’s website, click on the download link and select the OS. Discord might take at least 4-5 minutes to complete the installation process.