Watchman Command Validation Error

Originally written: April 14th, 2022

When I try to run watchman with npm and expo in a new project, I get this error on my 2021 Macbook Pro with macOS 12.3:

error: 'watchman::CommandValidationError: failed to validate command: resolve_projpath: None of the files listed in global config root_files are present in path

I've tried to go into System Preferences as some Google results suggest, but that did not work for me. However, what did work for me was a solution from Github: Create a file called .watchmanconfig with just {} as its content.