vite build
can fail when resolving root tsconfig.json
extends
#18094
Labels
bug: upstream
Bug in a dependency of Vite
has workaround
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
Running
vite build
in a workspace matching the following conditions can fail with an error fromesbuild
:tsconfig.json
.tsconfig.json
extends a sharedtsconfig.json
.tsconfig.json
is exposed via the package.jsonexports
field.tsconfig.json
of its ownAfter a period of time (<1 min on my test repo, 2-3+ minutes in others), the build process will error out with a lengthy Go stack trace and exit with abnormally with an error.
Notes
tsconfig.json
files extending one of the shared configs work fine. The issue does not arise until there is a roottsconfig.json
and a workspacetsconfig.json
.extends
(example:../../tsconfig.json
) resolves the issueThings that work as expected
Removing the
extends
vite-tsconfig-extends-repro:515bb73
Description
Rewriting the root
tsconfig.json
to not require use of anextends
and removing it.Steps
git clone https://github.com/bskinner-pfizer/vite-tsconfig-extends-repro.git
git checkout fix-removes-extends
yarn install
yarn workspace vite-demo build
Directly use the shared
tsconfig.json
instead of usingexports
vite-tsconfig-extends-repro:a0845fd
Description
Remove the
exports
from the sharedtsconfigs
package, and rewrite theextends
to use the preset files directly (example:"extends": "tsconfigs/configs/node.json"
)Steps
git clone https://github.com/bskinner-pfizer/vite-tsconfig-extends-repro.git
git checkout fix-avoid-using-exports
yarn install
yarn workspace vite-demo build
Reproduction
https://github.com/bskinner-pfizer/vite-tsconfig-extends-repro
Steps to reproduce
git clone https://github.com/bskinner-pfizer/vite-tsconfig-extends-repro.git
yarn install
yarn workspace vite-demo build
System Info
System: OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish) CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1245U Memory: 10.70 GB / 15.62 GB Container: Yes Shell: 5.8.1 - /bin/zsh Binaries: Node: 20.15.1 - /tmp/xfs-9594227a/node Yarn: 4.3.1 - /tmp/xfs-9594227a/yarn npm: 10.7.0 - ~/.nodenv/versions/20.15.1/bin/npm
Used Package Manager
yarn
Logs
Vite build output
log is truncated due to length. There are a lot of the
goroutine
statements printedValidations
The text was updated successfully, but these errors were encountered: