Skip to content
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

daemon: tailwind --watch exits and restarts in a loop #129

Open
marcuswhybrow opened this issue Nov 28, 2023 · 8 comments
Open

daemon: tailwind --watch exits and restarts in a loop #129

marcuswhybrow opened this issue Nov 28, 2023 · 8 comments

Comments

@marcuswhybrow
Copy link

modd.conf

tailwind.config.js {
  daemon: tailwind --watch --output ./build/tailwind.css
}

Output of running modd

11:16:21: daemon: tailwind --watch --output ./build/tailwind.css

Rebuilding...
exited: exit status 0
>> restart backoff... 1000ms
>> starting...

Rebuilding...
exited: exit status 0
>> restart backoff... 2000ms

Which continues forever.

Expected output:

Rebuilding...

Done in 977ms.
@marcuswhybrow
Copy link
Author

Still an issue with tailwind v3.4.1 and modd v0.8

@wader
Copy link

wader commented Apr 10, 2024

Same with modd master? the only other things i can think of is the either the env or stdin/stdout/stderr is different. To look at env maybe add a env ; ... before and see if you see something fishy, for stdin/stdout/stderr maybe do tailwind --watch --output ./build/tailwind.css 2>&1 < /dev/null | cat in an interactive shell to force stderr/stdout to a non-tty and stdin reading from null device (seems to be what will end up happening).

@wader
Copy link

wader commented Apr 10, 2024

Try this daemon: tailwind --watch --output ./build/tailwind.css < /dev/stdin but i'm not sure hows stdin that will be, i guess it will be modd's that gets inherited down

@marcuswhybrow
Copy link
Author

Same with modd master?

If I have time I'll look into the master build.

Try this daemon: tailwind --watch --output ./build/tailwind.css < /dev/stdin

Issue persists.

@wader
Copy link

wader commented Apr 10, 2024

Now when i think about it stdin will probably be /dev/null also, maybe something like sleep 999999 | tailwind ... could make tailwind have a stdin to block on and be happy, i suspect it exits when stdin ends

@marcuswhybrow
Copy link
Author

Wow, that did it! Great thinking, I had no idea stdin was both needed, and didn't exist.

@wader
Copy link

wader commented Apr 10, 2024

🥳 do you know if other modd-like tools have the same issue with tailwind? not really sure what "foregrounded" tools should expect from stdin hmm

@marcuswhybrow
Copy link
Author

Sorry, only used tailwind with modd, (inside Nix develop).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants