We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm seeing this error when process.env.TERM is undefined and process.stdout.isTTY is undefined.
process.env.TERM
process.stdout.isTTY
tput: No value for $TERM and no -T specified
It happens on line 60 when tput cols is executed.
tput cols
https://github.com/sindresorhus/term-size/blob/92aa07ee3a1cc28360af1c908f8a2ae10b6552bd/index.js#L60
The text was updated successfully, but these errors were encountered:
How are you seeing the error? Errors are silenced by the try/catch. Or do you mean you see it in the terminal as just printed output?
Sorry, something went wrong.
Its printed to stderr even though there is a try/catch.
You can reproduce if you deploy to ZEIT Now.
I added some console.log() prior to each line to determine exactly when it happens.
console.log()
"there was an error" is the message I put in the catch
catch
Here's the minimal steps to reproduce:
npm i -g now git clone https://github.com/styfle/bug-term-size-tput cd bug-term-size-tput now
It will look like this: https://zeit.co/testing-internal/bug-term-size-tput/5howzk8xs
Successfully merging a pull request may close this issue.
I'm seeing this error when
process.env.TERM
is undefined andprocess.stdout.isTTY
is undefined.It happens on line 60 when
tput cols
is executed.https://github.com/sindresorhus/term-size/blob/92aa07ee3a1cc28360af1c908f8a2ae10b6552bd/index.js#L60
The text was updated successfully, but these errors were encountered: