[Windows] Error: Watchman error: RootResolveError: unable to resolve root
- Dominant language
- C++
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Operating System: Windows 10 x64 Pro
Watchman:
```
λ watchman watch-list
{
"version": "4.9.4",
"roots": []
}
```
This is my first foray into using watchman, and I'm using it as part of expo and react-native. The last time I was working on my expo project was a few weeks ago, and everything worked fine. Actually, I haven't had any watchman issues until trying to build this week after upgrading expo. Here's the error:
```
[13:24:16] jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
[13:24:16] Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
[13:24:16] Error: Watchman error: RootResolveError: unable to resolve root R:\Workspace\Scrubbed\path: "R:\Workspace\Scrubbed\path" resolved to "//192.168.10.240/Web/Workspace/Scrubbed/path" but we were unable to examine "R:\Workspace\Scrubbed\path" using strict case sensitive rules. Please check each component of the path and make sure that that path exactly matches the correct case of the files on your filesystem.. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
```
I scrubbed the paths, but they're basically just the project names. Same case setup.
My filesystem for development is on my NAS which I have mounted using the drive letter "R:". The NAS, which would look like this in UNC, is mapped to 192.168.10.240:
`//NASNAME/Web` => `R:\`
I checked #240 #460 #484 and #653. I also checked the SO post here:
https://stackoverflow.com/questions/35715904/react-native-watchmanresponse-unable-to-resolve-root
When I setup my NAS originally, it was recommended to use capital case for all of the folders. The initial folders included "Web", "Media" and so forth. I can't really change them now because doing so might cause some failures with the existing backups.
Here's what the `ls` says for the directory:
```
λ ls -a
./ .babelrc .gitignore App.js assets/ package.json yarn-error.log
../ .expo/ .watchmanconfig app.json node_modules/ src/ yarn.lock
```
I attached the scrubbed log file. [log-18-12-18.txt](https://github.com/facebook/watchman/files/2691871/log-18-12-18.txt)
Here's what I've tried:
I reinstalled watchman, and I deleted the node_modules folder and reinstalled everything there.
Running watchman from C:\ seems fine:
```
C:\bin\watchman
λ watchman watch .
{
"version": "4.9.4",
"watch": "C:/bin/watchman",
"watcher": "win32"
}
```
Running watchman from R:\ no longer seems fine:
```
R:\watchman-test
λ watchman watch .
{
"version": "4.9.4",
"error": "RootResolveError: unable to resolve root R:/watchman-test: \"R:/watchman-test\" resolved to \"//192.168.10.240/Web/watchman-test\" but we were unable to examine \"R:/watchman-test\" using strict case sensitive rules. Please check each component of the path and make sure that that path exactly matches the correct case of the files on your filesystem."
}
```
I have a symlink setup for XAMPP from C:\, running from this area, this resolved to the UNC name rather than the IP address, but still had the same error.
I haven't looked at the watchman code, but is it possible that a newer version isn't able to handle the case sensitivity? Although that wouldn't explain it working the last time I tried to build. I thought initially upgrading expo was the problem, but then I tried to use watchman by itself via CLI and encountered the same error.
I have unfortunately run out of ideas. I'm not sure what to try next. I would appreciate any help.
Contributor guide
Assessment
This issue has not been assessed yet.