facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.44k stars 990 forks source link

Try to build react native clear project and getting watchman error: #1079

Closed devDoubleH closed 8 months ago

devDoubleH commented 1 year ago
Emitted 'error' event on WatchmanWatcher instance at:
    at Client.<anonymous> (/Users/user/Desktop/app/node_modules/metro-file-map/src/watchers/WatchmanWatcher.js:114:10)
    at Client.emit (node:events:513:28)
    at BunserBuf.<anonymous> (/Users/user/Desktop/app/node_modules/fb-watchman/index.js:111:12)
    at BunserBuf.emit (node:events:513:28)
    at /Users/abdukakhkhorovismoiljon/Desktop/AstroCoin/node_modules/bser/index.js:249:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  watchmanResponse: {
    error: 'std::__1::system_error: open: /Users/user/Desktop/app: Operation not permitted',
    version: '2022.10.03.00'
  }
}
kmancini commented 1 year ago

In recent macOS upgrades thing needs permission to access files in Desktop, Documents, Downloads etc. There are not these permissions by default for files in your home directory.

You can either move the repo to your home directory /Users/abdukakhkhorovismoiljon or grant watchman access to Desktop. To grant access go to System Preferences then "Security & Privacy" then click the "Privacy" tab, then scroll down in the pane on the left to click "Files and Folders", you should then see watchman listed in the panel on the right and a checkbox for Desktop. Make sure the Desktop checkbox is checked. (so thats: Security & Privacy > Privacy > Files and Folders and check the Desktop box for watchman).

devDoubleH commented 1 year ago

thanks worked for me)

Car-ElWilliams commented 1 year ago

In recent macOS upgrades thing needs permission to access files in Desktop, Documents, Downloads etc. There are not these permissions by default for files in your home directory.

You can either move the repo to your home directory /Users/abdukakhkhorovismoiljon or grant watchman access to Desktop. To grant access go to System Preferences then "Security & Privacy" then click the "Privacy" tab, then scroll down in the pane on the left to click "Files and Folders", you should then see watchman listed in the panel on the right and a checkbox for Desktop. Make sure the Desktop checkbox is checked. (so thats: Security & Privacy > Privacy > Files and Folders and check the Desktop box for watchman).

Perfect, solved the issue thx

biratdevpoudel commented 8 months ago

In recent macOS upgrades thing needs permission to access files in Desktop, Documents, Downloads etc. There are not these permissions by default for files in your home directory.

You can either move the repo to your home directory /Users/abdukakhkhorovismoiljon or grant watchman access to Desktop. To grant access go to System Preferences then "Security & Privacy" then click the "Privacy" tab, then scroll down in the pane on the left to click "Files and Folders", you should then see watchman listed in the panel on the right and a checkbox for Desktop. Make sure the Desktop checkbox is checked. (so thats: Security & Privacy > Privacy > Files and Folders and check the Desktop box for watchman).

This worked for me.