Skip to content

fix: correctly resolve tsgolint in yarn monorepo packages#1310

Open
rChaoz wants to merge 4 commits intovoidzero-dev:mainfrom
rChaoz:fix/tsgolint-yarn-monorepo
Open

fix: correctly resolve tsgolint in yarn monorepo packages#1310
rChaoz wants to merge 4 commits intovoidzero-dev:mainfrom
rChaoz:fix/tsgolint-yarn-monorepo

Conversation

@rChaoz
Copy link
Copy Markdown
Contributor

@rChaoz rChaoz commented Apr 5, 2026

Closes #1296

The oxlint-tsgolint executable resolution algorithm assumes that there is a node_modules directory in the current working directory (current package directory). However, this is only true for pnpm, yarn only creates a single node_modules in the workspace root, unlike pnpm which creates one under every package.

Because of this, vp lint/vp check fail to find the tsgolint executable. Updates the algorithm to extract the node_modules directory location based on resolve(), rather than process.cwd().

Additionally improves the error message to list all tried paths, rather than just one:

Before

VITE+ - The Unified Toolchain for the Web

Failed to find tsgolint executable: OXLINT_TSGOLINT_PATH points to '.\node_modules\.bin\tsgolint.cmd' which does not exist

Now

VITE+ - The Unified Toolchain for the Web

error: Failed to resolve lint command: GenericFailure, Error: Unable to resolve oxlint-tsgolint executable, tried:
- C:\Users\Matei\projects\agent-lab\node_modules\vite-plus\node_modules\.bin\tsgolint.exe
- C:\Users\Matei\projects\agent-lab\node_modules\vite-plus\node_modules\.bin\tsgolint.cmd
- C:\Users\Matei\projects\agent-lab\node_modules\.bin\tsgolint.exe
- C:\Users\Matei\projects\agent-lab\node_modules\.bin\tsgolint.cmd

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 1ebb5fa
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69d28e12a9b6ed00081e563a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp check fails in Yarn monorepo nested directory

1 participant