Skip to content

[v8] no yarn >1 support in tsconfig.json #21852

Description

@flying-sheep

Describe the bug

Using yarn ≥2, having "extends": "<package>/<file>" in a tsconfig.json breaks vite v8 with the misleading error message

[TSCONFIG_ERROR] Error: Failed to load tsconfig for 'src/main.tsx': Tsconfig not found

Reproduction

https://stackblitz.com/edit/vitejs-vite-chte2ura?file=package.json

Steps to reproduce

  1. yarn set version berry (doesn’t work on stackblitz: yarn berry (v2, v3, v4, …) is not supported on StackBlitz stackblitz/webcontainer-core#1235)
  2. yarn
  3. yarn dev
  4. click the link in the terminal to make vite try to build it

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: 22.22.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^8.0.0 => 8.0.0

Used Package Manager

yarn

Logs

Details

[TSCONFIG_ERROR] Error: Failed to load tsconfig for 'src/main.tsx': Tsconfig not found

  Plugin: vite:oxc
  File: /home/phil/Dev/Web/phil.red/src/main.tsx
      at transformWithOxc (file:///home/phil/Dev/Web/phil.red/.yarn/__virtual__/vite-virtual-f163d06fe8/4/.yarn/berry/cache/vite-npm-8.0.0-259ca3eb1b-10.zip/node_modules/vite/dist/node/chunks/node.js:3719:19)
      at TransformPluginContext.transform (file:///home/phil/Dev/Web/phil.red/.yarn/__virtual__/vite-virtual-f163d06fe8/4/.yarn/berry/cache/vite-npm-8.0.0-259ca3eb1b-10.zip/node_modules/vite/dist/node/chunks/node.js:3795:26)
      at EnvironmentPluginContainer.transform (file:///home/phil/Dev/Web/phil.red/.yarn/__virtual__/vite-virtual-f163d06fe8/4/.yarn/berry/cache/vite-npm-8.0.0-259ca3eb1b-10.zip/node_modules/vite/dist/node/chunks/node.js:29998:51)
      at async loadAndTransform (file:///home/phil/Dev/Web/phil.red/.yarn/__virtual__/vite-virtual-f163d06fe8/4/.yarn/berry/cache/vite-npm-8.0.0-259ca3eb1b-10.zip/node_modules/vite/dist/node/chunks/node.js:24133:26)
      at async viteTransformMiddleware (file:///home/phil/Dev/Web/phil.red/.yarn/__virtual__/vite-virtual-f163d06fe8/4/.yarn/berry/cache/vite-npm-8.0.0-259ca3eb1b-10.zip/node_modules/vite/dist/node/chunks/node.js:24941:20)

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarity: highp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions