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

bug: stderr doesn't show colors #16

Closed
privatenumber opened this issue May 21, 2022 · 8 comments · Fixed by #21
Closed

bug: stderr doesn't show colors #16

privatenumber opened this issue May 21, 2022 · 8 comments · Fixed by #21
Labels
bug Something isn't working outdated

Comments

@privatenumber
Copy link
Owner

image

Reported by @tachibana-shin here

@privatenumber privatenumber added the bug Something isn't working label May 21, 2022
@privatenumber
Copy link
Owner Author

privatenumber commented May 21, 2022

@tachibana-shin

Can you provide a screenshot of what it's supposed to look like?

My errors in Node.js aren't colored so this may be expected behavior.

Screen Shot 2022-05-21 at 2 43 58 AM

error.js

throw new Error('error message');

@tachibana-shin
Copy link

Ok, this is my errors in Node.js

image

@tachibana-shin
Copy link

hình ảnh

Report by@tachibana-shin đây

for this example i would expect it to have the same color as when i run node --loader @esbuild-kit/loader main.ts
image

@privatenumber
Copy link
Owner Author

I investigated this, and I'm not sure if there's a solution.

We pipe the stderr here so that experimental warnings can be removed.

It can be changed to inherit to support colors (TTY), but we lose suppressing warnings.

Alternatively, we can look for another way to suppress warnings (eg. in-process), but I haven't found a way.

@tachibana-shin
Copy link

I wrote a filter function for stderr to solve this problem.

But because the automatic feature of v8 is too confidential I cannot overcome it so the error message Error: <message error> will become Error:<message error>. I use 「:」in Japanese to ignore this automatic feature

Can I make such a drag request?

@privatenumber
Copy link
Owner Author

I'm not sure what you mean, but a pull request will help me understand what you're doing.

Thanks!

@tachibana-shin
Copy link

Pull Request #20

@privatenumber
Copy link
Owner Author

Found a simple solution!

Thanks for your help @tachibana-shin

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants