tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Wrapped in PHP Symfony/Process with tty enabled cli crashes

Open mvanduijker opened this issue 9 months ago • 1 comments

What version of Tailwind CSS are you using?

v4.0.4

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

tonysm/tailwindcss-laravel

What version of Node.js are you using?

NA

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

I think it's more of an issue with tty support, but if required I can make a repo with a clean laravel install and tonysm/tailwind-css-laravel package.

Describe your issue

when running php artisan tailwind:watch (or build) it fails with the following error:

Building assets...
3605 |   if (typeof sink === "object")
3606 |     if (typeof sink.write === "function")
3607 |       return stream[_fileSink] = sink;
3608 |     else
3609 |       throw new Error("Invalid FileSink");
3610 |     return stream[_fileSink] = Bun.file(sink).writer();
                             ^
error: Invalid argument
 syscall: "kqueue",
   errno: -22,
    code: "EINVAL",

      at NativeWritable_lazyConstruct (node:stream:3610:53)
      at NativeWritablePrototypeWrite (node:stream:3613:65)
      at eprintln (/$bunfs/root/tailwindcss-macos-arm64:61742:23)
      at <anonymous> (/$bunfs/root/tailwindcss-macos-arm64:62001:13)

Bun v1.1.43 (macOS arm64)
Done!

It was working with 3.4.* releases. When I remove the enabling of tty (https://github.com/tonysm/tailwindcss-laravel/blob/main/src/Commands/BuildCommand.php#L52) it starts working again. My guess it has something to do with tty support in the current released cli. Maybe other programming environments will have the same issue.

mvanduijker avatar Feb 07 '25 14:02 mvanduijker