Project Location Requirements

Before starting any Watchman project, make sure to create and store your project in the correct location to avoid permission errors.

When trying to run your React Native or Expo project, you might encounter a Watchman error like this:

Error: std::__1::system_error: open: /Users/temp/Documents/WatchmanTest: Operation not permitted
This error occurs because Watchman cannot access projects stored in certain macOS protected directories like Desktop, Documents, or Downloads.


Why This Happens

macOS has security restrictions that prevent applications like Watchman from accessing files in protected directories (Desktop, Documents, Downloads) without explicit permission. Moving your project to your home directory resolves this issue.


Move Your Project to Home Directory

  1. Locate Your Project

  2. If your project is currently in a protected directory like:
    • /Users/[USERNAME]/Documents/WatchmanTest
    • /Users/[USERNAME]/Desktop/YourProject
    • /Users/[USERNAME]/Downloads/YourProject

  3. Navigate to Your Home Directory
    • Open Finder
    • Go to Go menu → Home
    • You should now be in /Users/[USERNAME] (your home directory)
  4. Move Your Project
    • Open a new Finder window and navigate to where your project currently is (Documents, Desktop, or Downloads)
    • Select your project folder (e.g., WatchmanTest)
    • Cut the folder or drag it to your home directory
    • Paste it directly in your home directory
  5. Verify the Move
    • After moving, your project should now be located at:
    • /Users/[USERNAME]/WatchmanTest
    • Instead of:
    • /Users/[USERNAME]/Documents/WatchmanTest

  6. Navigate to New Location in Terminal
    • Open Terminal
    • Navigate to your project's new location:
    • cd ~/WatchmanTest


  7. Start Your Project
    • Now you can run your project commands without Watchman errors
    • npx expo start


Success

Your Expo development server should now start successfully, showing:

  • QR code for testing
  • Development server running on exp://[IP]:8081
  • Options to open on different platforms

If You Still Have Issues

  1. Clear Watchman cache: watchman watch-del-all
  2. Reset Metro cache: npx react-native start --reset-cache
  3. Restart your terminal and try again

Following these steps should resolve the Watchman permission error and allow your React Native/Expo projects to run smoothly.



Interested in MacinCloud Managed Servers?

Visit the Managed Server Plan page to obtain a Managed server.


Do you require full root/admin privileges on a MacinCloud Server?

Find out more about MacinCloud Dedicated Server Plans
.