claude-code - 💡(How to fix) Fix [BUG] Missing or broken symlink folder causes failure to launch Claude Desktop [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#50797Fetched 2026-04-20 12:12:47
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2unlabeled ×1

Error Message

Error: Failed to get 'documents' path {} Failed to get 'documents' path Error: Failed to get 'documents' path at Object.<anonymous> (app:///.vite/build/index.js:907:76077) at Module._compile (node:internal/modules/cjs/loader:1820:14) at Module._extensions..js (node:internal/modules/cjs/loader:1953:10) at Module.load (node:internal/modules/cjs/loader:1540:32) at Module._load (node:internal/modules/cjs/loader:1342:12) at c._load (node:electron/js2c/node_init:2:18047) at wrapModuleLoad (node:internal/modules/cjs/loader:262:19) at Module.require (node:internal/modules/cjs/loader:1563:12) at Module.h (app:///.vite/build/index.pre.js:5:3370) at _require.e.require (app:///.vite/build/index.pre.js:5:2341) at require (node:internal/modules/helpers:152:16) at Object.<anonymous> (app:///.vite/build/index.pre.js:62:3980) at Module._compile (node:internal/modules/cjs/loader:1820:14) at Module._extensions..js (node:internal/modules/cjs/loader:1953:10) at Module.load (node:internal/modules/cjs/loader:1540:32) at Module._load (node:internal/modules/cjs/loader:1342:12) at c._load (node:electron/js2c/node_init:2:18047) at node:electron/js2c/browser_init:2:145374 at node:electron/js2c/browser_init:2:145583 at node:electron/js2c/browser_init:2:145587%

Code Example

Error: Failed to get 'documents' path
{}
Failed to get 'documents' path
Error: Failed to get 'documents' path
    at Object.<anonymous> (app:///.vite/build/index.js:907:76077)
    at Module._compile (node:internal/modules/cjs/loader:1820:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1953:10)
    at Module.load (node:internal/modules/cjs/loader:1540:32)
    at Module._load (node:internal/modules/cjs/loader:1342:12)
    at c._load (node:electron/js2c/node_init:2:18047)
    at wrapModuleLoad (node:internal/modules/cjs/loader:262:19)
    at Module.require (node:internal/modules/cjs/loader:1563:12)
    at Module.h (app:///.vite/build/index.pre.js:5:3370)
    at _require.e.require (app:///.vite/build/index.pre.js:5:2341)
    at require (node:internal/modules/helpers:152:16)
    at Object.<anonymous> (app:///.vite/build/index.pre.js:62:3980)
    at Module._compile (node:internal/modules/cjs/loader:1820:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1953:10)
    at Module.load (node:internal/modules/cjs/loader:1540:32)
    at Module._load (node:internal/modules/cjs/loader:1342:12)
    at c._load (node:electron/js2c/node_init:2:18047)
    at node:electron/js2c/browser_init:2:145374
    at node:electron/js2c/browser_init:2:145583
    at node:electron/js2c/browser_init:2:145587%
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Desktop fails to launch with a generic "Claude Desktop failed to launch" error when ~/Documents is a symlink pointing to a nonexistent target. The app crashes entirely instead of falling back gracefully.

(Claude Code told me to put this here even though it's a Desktop issue.)

What Should Happen?

Claude Desktop should either launch successfully despite the broken documents path, or display a helpful error message identifying the broken path (~/Documents → <missing target>).

Error Messages/Logs

Error: Failed to get 'documents' path
{}
Failed to get 'documents' path
Error: Failed to get 'documents' path
    at Object.<anonymous> (app:///.vite/build/index.js:907:76077)
    at Module._compile (node:internal/modules/cjs/loader:1820:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1953:10)
    at Module.load (node:internal/modules/cjs/loader:1540:32)
    at Module._load (node:internal/modules/cjs/loader:1342:12)
    at c._load (node:electron/js2c/node_init:2:18047)
    at wrapModuleLoad (node:internal/modules/cjs/loader:262:19)
    at Module.require (node:internal/modules/cjs/loader:1563:12)
    at Module.h (app:///.vite/build/index.pre.js:5:3370)
    at _require.e.require (app:///.vite/build/index.pre.js:5:2341)
    at require (node:internal/modules/helpers:152:16)
    at Object.<anonymous> (app:///.vite/build/index.pre.js:62:3980)
    at Module._compile (node:internal/modules/cjs/loader:1820:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1953:10)
    at Module.load (node:internal/modules/cjs/loader:1540:32)
    at Module._load (node:internal/modules/cjs/loader:1342:12)
    at c._load (node:electron/js2c/node_init:2:18047)
    at node:electron/js2c/browser_init:2:145374
    at node:electron/js2c/browser_init:2:145583
    at node:electron/js2c/browser_init:2:145587%

Steps to Reproduce

  1. Set ~/Documents as a symlink to a path that doesn't exist (e.g. a Dropbox or Resilio Sync folder that hasn't synced yet)
  2. Launch Claude Desktop
  3. App fails with "Claude Desktop failed to launch"

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Claude Desktop Version: 1.3109.0

extent analysis

TL;DR

The issue can likely be fixed by modifying the code to handle the case where the ~/Documents directory is a symlink to a nonexistent target, allowing Claude Desktop to launch successfully or display a helpful error message.

Guidance

  • Verify that the ~/Documents symlink is indeed pointing to a nonexistent target by running ls -l ~/Documents in the Terminal.
  • Check the code at app:///.vite/build/index.js:907:76077 to see how the documents path is being retrieved and handled, as this is where the error is occurring.
  • Consider adding a check to ensure the target of the ~/Documents symlink exists before attempting to launch Claude Desktop.
  • Modify the error handling to display a more informative error message when the documents path cannot be retrieved.

Example

const documentsPath = '~/Documents';
const targetPath = fs.readlinkSync(documentsPath);
if (!fs.existsSync(targetPath)) {
  // Handle the case where the target path does not exist
  console.error(`Error: ~/Documents symlink points to nonexistent target: ${targetPath}`);
  // Display a helpful error message to the user
}

Notes

The provided code snippet is just an example and may need to be adapted to fit the specific requirements of the Claude Desktop application. Additionally, the fs module is assumed to be available, but this may not be the case in the actual application.

Recommendation

Apply a workaround to handle the case where the ~/Documents symlink points to a nonexistent target, as this will allow Claude Desktop to launch successfully or display a helpful error message. This can be done by modifying the code to check the existence of the target path and handling the error accordingly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING