Vite unable to find base tsconfig in a yarn monorepo #16156
Labels
bug: upstream
Bug in a dependency of Vite
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
I'm using a Yarn monorepo for a project, and I have share tsconfig files located in a separate package within the monorepo. When running
vite
orvite build
, vite will be unable to resolve the base configuration and prints the following message (<path-to>
is not literally printed, but is a stand-in for the actual path on my filesystem):Both Typescript (
tsc
) and VSCode are able to successfully resolve the location of the base config, and do not display any warnings or errors about not being able to resolve the config file.Switching the
nodeLinker
mode in the.yarnrc.yml
file frompnp
tonode-modules
allows for the base config to successfully be found and results in the correct behavior.Expected Behavior
The path to the base config should be properly resolved, and a warning should not be printed.
Actual Behavior
The base configuration can not be resolved and Vite completes it's operation without including the settings in the extended configuration.
Reproduction
https://github.com/bskinner/tsconfig-locate-repro
Steps to reproduce
Run
yarn
then run eitheryarn workspace vite-demo build
oryarn workspace vite-demo serve
(both will show the warning)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: 13.54 GB / 15.62 GB Container: Yes Shell: 5.8.1 - /bin/zsh Binaries: Node: 20.10.0 - /tmp/xfs-1b4eff7a/node Yarn: 4.1.1 - /tmp/xfs-1b4eff7a/yarn npm: 10.2.3 - ~/.nodenv/versions/20.10.0/bin/npm
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: