ERR_MODULE_NOT_FOUND on startup: Cannot find module '...\resources\app\out\main.js' (Windows)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Bug Description

Cursor fails to start up and throws an “Uncaught Exception” dialog pointing to a missing main.js file in the installation directory. This issue has occurred multiple times. Reinstalling the application temporarily fixes the issue, but it eventually recurs. It crashed twice so far.

Probably linked to Cursor not starting up - error occurred in the main process - #7 by mohitjain but happens multiple times.

Error Stack Trace

Uncaught Exception:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module ‘C:\Program Files\cursor\resources\app\out\main.js’ imported from C:\Program Files\cursor
at finalizeResolution (node:internal/modules/esm/resolve:279:11)
at moduleResolve (node:internal/modules/esm/resolve:873:10)
at defaultResolve (node:internal/modules/esm/resolve:997:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:731:20)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:310:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:664:36)
at TracingChannel.tracePromise (node:diagnostics_channel:350:14)
at ModuleLoader.import (node:internal/modules/esm/loader:663:21)
at node:electron/js2c/browser_init:2:141465

Environment

  • OS: Windows 10/11 (x64)
  • Installation Path: C:\Program Files\cursor
  • Cursor Version: [Insert your current version here, e.g., 0.44.x]

Additional Context / Suspected Cause

This appears to be related to the background auto-update mechanism. When Cursor attempts to apply an update in the background, the process seems to get interrupted (potentially due to corporate antivirus file-locking or a lingering background cursor.exe process). The old files are deleted, but the new ones fail to write completely, leaving the installation in a corrupted state where resources\app\out\main.js is missing.

Steps to Reproduce

Use Cursor, then it crashes and shows that

Expected Behavior

Keep working

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

IDE v3.7.42

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi @Yvan_Richer Thanks for the forum post.

Thanks for the detailed report and screenshot. This looks like a corrupted Windows install after an update attempt, where Cursor is left missing resources\app\out\main.js.

To get unblocked now, please reinstall the latest Cursor build from Cursor · Download .

To reduce the chance of this recurring, you can set Cursor updates to manual by editing your User Settings JSON directly:

  1. Press Ctrl+Shift+P
  2. Run Preferences: Open User Settings (JSON)
  3. Add these settings:
{
"update.mode": "manual",
"update.enableWindowsBackgroundUpdates": false
}

Then restart Cursor.

If this is a managed company machine, your IT/admin team may also need to allow Cursor’s install directory, usually C:\Program Files\cursor, in your endpoint protection or antivirus policy.

Ok, just letting you know there’s an issue. Thanks

Thanks Yvan! Let me know if you need any help with anything related