Software⏱️ 2 min read📅 2026-05-31

How to Fix: macOS - Permission denied @ apply2files - /usr/local/lib/node_modules/expo-cli/node_modules/extglob/lib/.DS_Store?

Permission denied error when installing starship via homebrew on macOS.

Quick Answer: Delete the .DS_Store file in the affected directory to resolve the permission issue.

The error 'Permission denied @ apply2files - /usr/local/lib/node_modules/expo-cli/node_modules/extglob/lib/.DS_Store' occurs when Homebrew is unable to remove a hidden file named '.DS_Store' in the expo-cli package. This issue arises due to permissions issues on the system.

🔍 Why This Happens

  • [Cause]

✅ Best Solutions to Fix It

Method 1: Removing .DS_Store File

  1. Step 1: Open Terminal and type 'rm -rf /usr/local/lib/node_modules/expo-cli/node_modules/extglob/lib/.DS_Store' to remove the file.

Method 2: Using Homebrew's Clean Command

  1. Step 1: Open Terminal and type 'brew clean' to remove any unnecessary files.

💡 Conclusion

By following these steps, you should be able to resolve the 'Permission denied' issue and continue using Homebrew without any problems.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions