`turbo watch`: "discovery failed: bad grpc status code: The operation was cancelled" on macOS case-sensitive volumes
Verify canary release
- [X] I verified that the issue exists in the latest Turborepo canary release.
Link to code that reproduces this issue
https://github.com/hrstkatomas/test-monorepo-tooling
Which canary version will you have in your reproduction?
turbo 2.3.3
Enviroment information
turbo 2.3.3
CLI:
Version: 2.3.3
Path to executable: /Volumes/.../test-monorepo-tooling/node_modules/.pnpm/[email protected]/node_modules/turbo-darwin-arm64/bin/turbo
Daemon status: Running
Package manager: pnpm
Platform:
Architecture: aarch64
Operating system: macos
WSL: false
Available memory (MB): 14738
Available CPU cores: 10
Environment:
CI: None
Terminal (TERM): xterm-256color
Terminal program (TERM_PROGRAM): Apple_Terminal
Terminal program version (TERM_PROGRAM_VERSION): 455
Shell (SHELL): /opt/homebrew/bin/bash
stdin: false
Expected behavior
Should run the project in watch mode without any issues on MacOS on both case-sensitive and case-insensitive file systems.
Actual behavior
When running turbo watch [command] on MacOS on case-sensitive volume, I get this error:
turbo 2.3.3
• Packages in scope: @repo/typescript-config, @repo/ui, tribalfootball
• Running build in 3 packages
• Remote caching disabled
× failed to connect to daemon
╰─▶ server is unavailable: channel closed
After running turbo daemon clean I receive a slightly different error for the following run:
turbo 2.3.3
• Packages in scope: @repo/typescript-config, @repo/ui, tribalfootball
• Running build in 3 packages
• Remote caching disabled
× discovery failed: bad grpc status code: The operation was cancelled
To Reproduce
- Mac required
- In Disk Utility add a new Volume and select Case-sensitive format
- Clone the repository onto newly created volume
- Run
turbo watch build
Additional context
The same repository works as expected when I clone it onto case-insensitive volume
+1 seeing the same issue
I had the same issue on linux (ubuntu 24.04).
Tried to run with TURBO_DAEMON=false turbo ... and started to work, then tried without it and still working, so not sure what was wrong. :/
Try running turbo daemon start before executing turbo watch xxxxx, which is a workaround.
You can verify the daemon status with turbo daemon status.
While turbo watch works on macOS without explicitly starting the daemon, Linux environments seem to require this step to avoid gRPC errors.
This issue appears to occur when the daemon is not running.
I'm facing the same issue on devcontainer(mcr.microsoft.com/vscode/devcontainers/base:bullseye).
The suggestions above didn't work for me. I even tried to start an application powered by turbo in APFS case-insensitive volume which didn't work either.
macOS version: 15.2 Repository: https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite
Temporary solution that worked:
- I moved the project to the
Downloadsand ran the same command from there and the project started successfully.
Consistent issue during docker build on non-persistent tasks.
I got the same problem, if I try to run turbo watch in a case sensitive directory, I got this error:
> all:watch
> TURBO_DAEMON=false turbo watch build lint typecheck test:unit
turbo 2.3.4
WARNING daemon is required for watch, ignoring request to disable daemon
• Packages in scope: @repo/anomalies-service, @repo/auto-portal-app, @repo/auto-portal-gateway-service, @repo/business-rules, @repo/client-management-service, @repo/config-service, @repo/domain-data-service, @repo/eslint-config, @repo/estimate-generation-service, @repo/event-service, @repo/gateway, @repo/input-capture-app, @repo/input-capture-gateway-service, @repo/landing-page-app, @repo/localisation, @repo/notification-service, @repo/orchestration-service, @repo/pdf-generation-service, @repo/product-api-service, @repo/router-service, @repo/shared, @repo/template, @repo/trevor, @repo/typescript-config, @repo/ui-framework, @repo/ui-provider, @repo/ui-telemetry, ngnix_dev
• Running build, lint, typecheck, test:unit in 28 packages
• Remote caching disabled
× Failed to connect to daemon.
╰─▶ server is unavailable: channel closed
disabling /enabling the deamon is not changing anything. also restarting the deamon does not change anything.
thos are the deamon logs:
2025-01-30T12:31:07.305480Z WARN turborepo_filewatch: failed to wait for initial filesystem cookie: filewatching failed to start: waiting for cookie timed out: deadline has elapsed
2025-01-30T12:31:07.306875Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2025-01-30T12:31:13.504866Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2025-01-30T12:32:12.052214Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2025-01-30T12:37:36.703688Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2025-01-30T12:39:37.984942Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running
2025-01-30T12:39:41.804340Z INFO turborepo_lib::daemon::server: triggering shutdown
2025-01-30T12:39:44.948249Z WARN turborepo_filewatch: failed to wait for initial filesystem cookie: filewatching failed to start: waiting for cookie timed out: deadline has elapsed
2025-01-30T12:39:46.714379Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
this is the deamon status output:
> npx turbo daemon status [12:41:30]
turbo 2.3.4
✓ daemon is running
log file: /Volumes/WorkspaceNew/auto-platform-product/.turbo/daemon/166ab6830cc0b4dd-turbo.log.2025-01-30
uptime: 6m 851mss
pid file: /var/folders/21/f_18x3xj50b9d0cthh7k5lgh0000gq/T/turbod/166ab6830cc0b4dd/turbod.pid
socket file: /var/folders/21/f_18x3xj50b9d0cthh7k5lgh0000gq/T/turbod/166ab6830cc0b4dd/turbod.sock
Is a path to a fix known for this? Case sensitive volumes are very common
Like @CodingLukas above, I am able to replicate this issue on case-insensitive external volumes on MacOS as well. A path to a fix would be great!
Yeah l am still facing this issue. Can use turbo run but cannot use turbo watch at all
+1 Also facing this
same issue on Mac Case Sensitive
npx turbo version
turbo 2.5.8
× Discovery failed: server is unavailable: package discovery unavailable