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

Build writes normal output to stderr #4603

Open
4 tasks done
kaiyoma opened this issue Mar 7, 2025 · 3 comments
Open
4 tasks done

Build writes normal output to stderr #4603

kaiyoma opened this issue Mar 7, 2025 · 3 comments
Labels
has-workaround Has workaround, low priority needs more discussion

Comments

@kaiyoma
Copy link

kaiyoma commented Mar 7, 2025

Describe the bug

A VitePress build is writing normal (non-error) messages to stderr. This causes other tools (like Rush) to interpret the build as failing.

Reproduction

$ npx vitepress build> stdout.txt
✓ building client + server bundles...
✓ rendering pages...

Expected behavior

Non-error messages written to stdout.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    Memory: 4.87 GB / 15.71 GB
  Binaries:
    Node: 22.14.0 - C:\Program Files\Node.js\node.EXE
    npm: 11.1.0 - C:\Program Files\Node.js\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    vitepress: 1.6.3 => 1.6.3

Additional context

No response

Validations

@kaiyoma kaiyoma added the bug: pending triage Maybe a bug, waiting for confirmation label Mar 7, 2025
@brc-dd
Copy link
Member

brc-dd commented Mar 8, 2025

You can configure rush to change the behavior - microsoft/rushstack#1329 (comment)

We can fix this in vitepress too and vitepress' output isn't consistent but IMO rush isn't right either. Also, not sure what to do with spinner when it actually fails.

Running spinners on stderr is a common practice:

sindresorhus/ora#85 (comment)

Other examples -

vuejs/vue-cli#4389 (comment)
sloria/konch#66 (comment)
denoland/deno#25114

But one can argue that the main reason for doing that is allow piping which one won't be doing with vitepress anyway.

@brc-dd brc-dd added needs more discussion and removed bug: pending triage Maybe a bug, waiting for confirmation labels Mar 8, 2025
@kaiyoma
Copy link
Author

kaiyoma commented Mar 8, 2025

Oh cool, I didn't know about that Rush setting. Thanks! (I ended up working around this by piping stderr to stdout when running the VitePress build.) Feel free to close this if it's a WONTFIX.

@brc-dd
Copy link
Member

brc-dd commented Mar 8, 2025

I'm keeping this open for now. Let's see if there are better suggestions. A logger refactor is planned. Will see what to do with this then. Feel free to unsubscribe from the right sidebar. 👍

@brc-dd brc-dd added the has-workaround Has workaround, low priority label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-workaround Has workaround, low priority needs more discussion
Projects
None yet
Development

No branches or pull requests

2 participants