Can't save files?

Whenever i try to save a file to restart my dev server i get this error and im unable to save files?
Failed to save ‘sign-up-form.tsx’: ENOENT: no such file or directory, open '/Applications/Cursor.app/Contents/Resources/Cursor.icns

1 Like

I have this randomly happen with me as well. Saved work, went to sleep, woke up and started up again, then this issue. No material change happened in between saves.

1 Like

Good day. I was having the same issue. I went to “/Applications/Cursor.app/Contents/Resources/”, found Cursor.icns was not there, so I copied what was there “icon.icns” to “Cursor.icns”, and problem solved. I guess it’s a config somewhere that references Cursor.icns or something. But well, this worked just fine.

4 Likes

Fixed the issue for me as well on MacOS. I still have to save as sudo now for some reason. I think this happened as a result of importing my vscode settings and extensions.

There is a missing icon file that is causing the issue.

Cursor App Info below for the cursor devs.

Version: 0.42.4

VSCode Version: 1.93.1

Commit: b1e87884330fc271d5eb589e368c35f14e76dec0

Date: 2024-10-29T17:17:29.347Z

Electron: 30.4.0

Chromium: 124.0.6367.243

Node.js: 20.15.1

V8: 12.4.254.20-electron.0

OS: Darwin arm64 23.6.0

i have the same issue, is there any fix for it?

Failed to save ‘’: ENOENT: no such file or directory, open ‘/Applications/Cursor.app/Contents/Resources/Cursor.icns’

I also encountered the situation in the Cursor Editor, preventing users from saving files within repositories created using the npm command. The issue stemmed from file ownership and permission conflicts, likely due to the use of sudo during the repository initialization process.

Steps to Reproduce:

  1. Create a new project directory using the npm command:
sudo npm init
  1. Open the project in Cursor Editor.
  2. Attempt to save changes to any file, such as App.tsx.
  3. An error message appears:
Failed to save 'App.tsx': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.

Root Cause:
The use of sudo during the npm init process caused files and folders in the project directory to be owned by the root user, restricting write access for the current user in Cursor Editor.

Resolution:
The issue was resolved by adjusting file ownership and permissions. The following steps were taken:

  1. Checked File Ownership and Permissions:
  • Verified ownership using:
ls -la

Note: This step is essential to identify if the files or directories are owned by root or another user, which could cause permission issues.

  1. Changed Ownership:
  • Transferred ownership of the project directory to the current user:
sudo chown -R $(whoami) /path/to/your/project

Note: This single command effectively resolved the permission issue by recursively changing ownership of all files and folders in the current directory.

Comment:
This is not a Cursor Editor-specific issue but a general file ownership and permissions issue on the system.

if you update to latest version (0.42.5), does it go away?

Yes, I already updated to the latest version (0.24.5).

still having this issue?

I have already resolved the issue and provided a summary of the solution in a previous reply…

1 Like