You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

删除旧项目后Neo4j Desktop无法启动,求保留数据的解决方法

Fix Neo4j Desktop Initialization Error (TypeError: Cannot read property 'name' of undefined) Without Losing Data

I’ve run into this exact issue before after cleaning up old projects in Neo4j Desktop—total panic when I realized my datasets were tied to the default directory. Here’s how to fix it without touching your 400GB database:

Step 1: Back Up Critical Configuration Files First

Before making any changes, protect yourself by backing up the files that control Neo4j Desktop’s project and app settings:

  • Open your terminal and run these commands to back up the key configs to your Desktop:
    cp ~/Library/Application\ Support/Neo4j\ Desktop/application.json ~/Desktop/neo4j-app-backup.json
    cp ~/Library/Application\ Support/Neo4j\ Desktop/projects.json ~/Desktop/neo4j-projects-backup.json
    

These files are small (kb-sized) and contain no actual dataset data—only metadata about your projects and Desktop preferences.

Step 2: Repair the Corrupted projects.json File

The TypeError: Cannot read property 'name' of undefined error almost always comes from a broken entry in projects.json (likely leftover from when you deleted old projects). Here’s how to fix it:

  1. Open ~/Library/Application Support/Neo4j Desktop/projects.json in a text editor with JSON validation (like VS Code—its built-in linter will flag syntax errors).
  2. Scan through the list of projects. Look for any project object that’s missing the "name" field, or has incomplete/empty values (e.g., {}, or entries with missing commas/brackets).
  3. Delete that invalid project entry entirely. Make sure the remaining JSON is properly formatted (all brackets/commas match, no trailing commas).
  4. Save the file and close the editor.

Step 3: Clear Neo4j Desktop’s Cache

Corrupted cache files can also cause initialization failures. Clear them safely without touching your datasets:

  • Navigate to ~/Library/Application Support/Neo4j Desktop/cache
  • Delete all files and folders inside this directory (don’t delete the cache folder itself).
  • This cache only stores temporary UI data and will be rebuilt automatically when you restart Neo4j Desktop.

Step 4: Emergency Workaround—Start the Database Directly

If Desktop still won’t launch, you can bypass it entirely to access your database for your paper:

  1. Find your database’s installation directory. It’ll be in a path like:
    ~/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-<your-db-uuid>/installation-<neo4j-version>
    
  2. Go into the bin subdirectory and run the start command:
    ./neo4j start
    
  3. You can then access your database via the browser at http://localhost:7474 just like you would through Desktop.

All these steps leave your actual dataset files (in the neo4jDatabases folder) completely untouched—your 400GB data is safe throughout the process.

内容的提问来源于stack exchange,提问作者Dust_In_The_Wind

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:05:09