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

tty.isatty is not a function #74

Closed
from-nibly opened this issue Sep 22, 2021 · 2 comments
Closed

tty.isatty is not a function #74

from-nibly opened this issue Sep 22, 2021 · 2 comments

Comments

@from-nibly
Copy link

from-nibly commented Sep 22, 2021

I'm using sanitize-html in the browser which uses postcss which uses this.

When postcss imports collorette it fails on the line checking for isCompatibleTerminal

A quick fix would be to switch to the following by adding a check that tty.isatty exists before calling it.

const isCompatibleTerminal =
  tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb"
@jorgebucaran
Copy link
Owner

Yup, that's exactly what we're doing now. Should be fixed when you update your dependencies.

@from-nibly
Copy link
Author

Ok well I think that would have actually solved my problem but it turns out postcss dropped colorette for nanocolors 12 hours ago 🤷

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