Skip to content

[🐞] disable colors #7861

@MarcWeber

Description

@MarcWeber

Which component is affected?

Qwik Runtime

Describe the bug

pnpm run build

src/tsmono/u-spawn/index.ts:152:23 - error TS2339: Property 'end' does not exist on type 'Readable'.

152             y.stderr?.end()
                          ~~~


Found 96 errors in 29 files.

Errors  Files
     1  src/components/layout.tsx:4
     1  src/components/public-page.tsx:110
     5  src/i18n.ts:7

The file:line:col error lines contain colors. And nothing switches it off. I tried:

export FORCE_COLOR=0; export  NO_COLOR=true;  export NODE_DISABLE_COLOR=1

Not sure whether vite eslint or whatever is the problem. It would be nice if some env vars would get that job done. The reason is that I use Neovim to load the log into qwickfix. Yes could be piping through ansifilter. It should be env vars so that you can easily run with colors in terminal and without using any script.

Reproduction

https://stackblitz.com/edit/github-u3bcvkw2?file=src%2Froutes%2Findex.tsx

Steps to reproduce

run npm install followed by export FORCE_COLOR=0; export NO_COLOR=true; export NODE_DISABLE_COLOR=1; npm run build. In index.tsx I removed a } to cause a syntax error. The error line contains colors. I also tried npm run build | cat also fails.

System Info

Don't think this matters anyway:
  System:
    OS: Linux 6.6 cpe:/o:nixos:nixos:25.11 25.11 (Xantusia)
    CPU: (8) x64 AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
    Memory: 14.01 GB / 37.08 GB
    Container: Yes
    Shell: 5.9 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 24.0.2 - /run/current-system/sw/bin/node
    Yarn: 1.22.22 - ~/node_modules/.bin/yarn
    npm: 11.3.0 - /run/current-system/sw/bin/npm
    pnpm: 9.15.9 - ~/node_modules/.bin/pnpm
    bun: 1.2.13 - /run/current-system/sw/bin/bun
  Browsers:
    Chromium: 136.0.7103.113
  npmPackages:
    @builder.io/qwik: ^1.15.0 => 1.15.0 
    @builder.io/qwik-city: ^1.15.0 => 1.15.0 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 7.13.0 
    vite: 5.3.5 => 5.3.5

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    STATUS-2: missing infoIncomplete issue/pr template or missing important informationTYPE: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions