-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Unexpected early exit
error after executing vite build
in a multi-entry project with vite@^5.1.0
#16027
Comments
Unexpected early exit.
error after executing vite build
in a multi-entry project in vite@^5.1.0
Unexpected early exit
error after executing vite build
in a multi-entry project with vite@^5.1.0
Ah, I believe this is a confirmed bug from Related issue in A workaround mentioned in that issue from @dominikg, the author of
And I can confirm the workaround also works in this case 🎉. |
It turns out there're already related issues/PRs in vite regarding this problem: #15870, #15899, #15932 I didn't find them because the error message is not very clear for me to check where to look at. And searching the error message leads me to some old unrelated issues. Feel free to close this issue if this is considered duplicated. |
Duplicate of #15870 |
Describe the bug
When I update
vite
to^5.1.0
, executingvite build
in my project produces an error:Error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit: ...
.My project is a multi-entry set up. I spent some time to locate the problem and managed to provide a minimal repro below.
Here is the folder structure of the repro project:
. ├── package-lock.json ├── package.json ├── src │ ├── a.ts │ ├── b.ts │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts
Here are the configs in the repro project:
vite.config.ts
:tsconfig.json
tsconfig.node.json
The error is:
Some info I find may be helpful:
v5.1.0-beta.7
or versions prior to that don't throw this error, and the project can be successfully built. So this bug is introduced somewhere in v5.1.0-beta.7...v5.1.0.vite.config.ts
, it can be successfully built.extends
field intsconfig.node.json
, the project can be successfully built.Thanks in advance!
Reproduction
https://github.com/Sec-ant/vite-multi-entry-bug-repro
Steps to reproduce
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: