Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone CLI outputs "watchman not found" #15983

Closed
aptinio opened this issue Jan 29, 2025 · 3 comments
Closed

Standalone CLI outputs "watchman not found" #15983

aptinio opened this issue Jan 29, 2025 · 3 comments

Comments

@aptinio
Copy link

aptinio commented Jan 29, 2025

What version of Tailwind CSS are you using?

v4.0.0

What build tool (or framework if it abstracts the build tool) are you using?

standalone executable, specifically, tailwindcss-linux-x64

What version of Node.js are you using?

N/A

What browser are you using?

N/A

What operating system are you using?

Linux

Reproduction URL

https://github.com/aptinio/tailwind-linux-cli-watchman-issue

Describe your issue

  1. Download https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-linux-x64 into root of reproduction project
  2. Run:
./tailwindcss-linux-x64 --input input.css --output output.css --watch

The following is included in the output, even if the standalone CLI successfully rebuilds the output when Tailwind classes are changed in index.html

sh: line 1: watchman: command not found
@verachell
Copy link

I see this too, using a different OS tailwind standalone binary ( linux-arm64 ). Here is the info on mine:

What version of Tailwind CSS are you using? v4.0.0

What build tool (or framework if it abstracts the build tool) are you using? standalone executable tailwindcss-linux-arm64

What version of Node.js are you using? N/A

What browser are you using? N/A

What operating system are you using? Raspberry Pi running Debian

Reproduction URL: N/A

Describe your issue: a message comes up after I run my command ./tailwindcss --input in.css --output out.css --cwd .. --watch

sh: 1: watchman: not found

However, --watch still works because it rebuilds the css when classes are changed, and html output changes visually as expected.

In other words, the message sh: 1: watchman: not found is unexpected, but I do not see any loss in functionality.

@philipp-spiess
Copy link
Member

Interesting! According to the docs of @parcel/watcher (the library we use for watching for file changes in the CLI), the watchman backend should only be selected if watchman is actually installed.

This function seems to run to check if watchman is installed: https://github.com/parcel-bundler/watcher/blob/119f1ff04bb41c2369929e37274900c61b0a9f49/src/watchman/WatchmanBackend.cc#L43-L66 any chance you have a WATCHMAN_SOCK variable in your shell?

@philipp-spiess
Copy link
Member

Oh I misunderstood I guess if it still works this is just about the stdout being logged, possibly by this check right here: https://github.com/parcel-bundler/watcher/blob/119f1ff04bb41c2369929e37274900c61b0a9f49/src/watchman/WatchmanBackend.cc#L49

I think we can safely ignore this because in that case, @parcerl/watcher will fall back to another watcher. Maybe what we could do is create a bug report on the @parcel/watcher repo though if you want to silence this somehow. Does anyone of you want to look into that since you already have a system where this repros? (Ideally the repro for the parcel repository only uses @parcel/watcher and not tailwindcss).

@tailwindlabs tailwindlabs locked and limited conversation to collaborators Jan 29, 2025
@philipp-spiess philipp-spiess converted this issue into discussion #16011 Jan 29, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants