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

Unhandled errors while using incorrect postcss config #18882

Closed
7 tasks done
artemdemo opened this issue Dec 4, 2024 · 0 comments · Fixed by #18886
Closed
7 tasks done

Unhandled errors while using incorrect postcss config #18882

artemdemo opened this issue Dec 4, 2024 · 0 comments · Fixed by #18886
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@artemdemo
Copy link

Describe the bug

When trying to run vite build with an incorrect postcss.config.js file, vite fails (which is expected), but there are also unhandled errors thrown (in addition to the obvious error that postcss is failed to load).
In total there are 2 additional unhandled errors.
I suspect this is happening because postcss.config.js is processed in a separate thread, and this thread is throwing additional errors, which are not being handled correctly.

Reproduction

https://stackblitz.com/edit/vitejs-vite-ljmist?file=builder.js

Steps to reproduce

  1. Open the reproduction link
  2. Run npm run build script in the terminal
  3. See vite build crash in the terminal

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^6.0.0 => 6.0.2

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Dec 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants