How to Fix OneDrive JavaScript Required Error on Windows 11
Question details
Users are unable to sign into the OneDrive desktop app because it displays a message stating that JavaScript must be enabled, despite it already being enabled in installed web browsers.

- Product
- OneDrive Desktop App
- Device & OS
- Windows 11
- Scenario
- Signing into the OneDrive desktop app after a Windows upgrade or changes to the application installation path.
- Observed behavior
- A 'JavaScript must be enabled' error blocks the sign-in process, sometimes associated with an unusual installation path involving Lightroom or other unexpected folders.
Verify that you can successfully sign into your OneDrive account using a standard web browser to ensure your account credentials are correct and your account is active.
Reinstall OneDrive and Correct the Installation Path
Uninstalling the corrupted OneDrive app and performing a clean installation is the most effective way to resolve built-in web authentication and path-related errors.
The OneDrive desktop app relies on internal Windows web components to display the sign-in screen. When the installation path is corrupted or points to an unusual directory, these components fail to load correctly, triggering a false JavaScript error.
Open Windows Settings, navigate to 'Apps' > 'Installed apps', search for Microsoft OneDrive, click the three dots next to it, and select 'Uninstall'.
Restart Windows 11 to clear out any lingering temporary files or registry keys associated with the broken installation.
Visit the official Microsoft website to download the newest version of the OneDrive desktop client.
Run the downloaded installer. Once installed, launch OneDrive and attempt to sign in again. The clean install forces the application into its default Windows directory, resolving path conflicts.

Experience Seamless Document Management with WPS Office
If Microsoft Office and OneDrive are causing persistent sign-in headaches, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative with its own reliable built-in cloud storage system.
- 1. Download WPS Office: Visit the official WPS website and click the free download button for Windows.
- 2. Install the Software: Run the lightweight installer to quickly set up the office suite on your PC.
- 3. Use WPS Cloud: Sign in with your email to automatically save and sync your documents without complex folder paths.

Frequently Asked Questions
Why does OneDrive say JavaScript is required when it is already enabled in Chrome?
The OneDrive desktop app relies on Windows' built-in internet components (like Edge WebView) for its sign-in screen, not your default web browser like Chrome or Firefox. A corrupted installation prevents these internal components from running properly, triggering a false error.
How do I fix unusual OneDrive installation paths on Windows 11?
The easiest way to correct an abnormal installation path is to uninstall the current version of OneDrive, restart your computer, and reinstall it from the official Microsoft website. This forces the application to install in its default, secure Windows directory.
Can system policies or antivirus software cause the JavaScript error in OneDrive?
Yes. Overly strict firewall rules, antivirus software, or Windows security policies can block the scripts OneDrive uses to render the sign-in page. Temporarily disabling your antivirus or checking your firewall permissions can help identify if this is the root cause.




