GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `vp run -r lint` fails on Windows in monorepos: OXLINT_TSGOLINT_PATH is set to a root-relative path resolved from the wrong cwd · Issue #1747 · voidzero-dev/vite-plus

vp run -r lint fails on Windows in monorepos: OXLINT_TSGOLINT_PATH is set to a root-relative path resolved from the wrong cwd #1747

New issue
Copy link
New issue
Copy link
Closed
Bug
#1758
Closed
vp run -r lint fails on Windows in monorepos: OXLINT_TSGOLINT_PATH is set to a root-relative path resolved from the wrong cwd#1747
Bug
#1758
Copy link
Assignees
semimikoh
Labels
bugSomething isn't workingcontribution welcome
Milestone
Beta

Description

@dm4t2
dm4t2
opened on Jun 2, 2026
Issue body actions

Describe the bug

On Windows, running vp run -r lint (or vp lint for a workspace package) in a pnpm monorepo fails with:

Failed to find tsgolint executable: OXLINT_TSGOLINT_PATH points to
'.\node_modules\.pnpm\[email protected]_...\node_modules\vite-plus\node_modules\.bin\tsgolint.cmd'
which does not exist

The tsgolint executable does exist, the path is just wrong. lint() computes OXLINT_TSGOLINT_PATH as a path relative to process.cwd() of the launcher (the repo root under vp run -r), but oxlint is then spawned with its cwd set to the workspace package directory. The relative .\node_modules\.pnpm\... therefore resolves against packages/<pkg>/, where no .pnpm directory exists (in a pnpm workspace, .pnpm lives only at the repo root).

Root cause

In dist/bin.js, lint() resolves the correct absolute path to tsgolint, then downgrades it to a relative path before exporting it:

if (!oxlintTsgolintPath) throw new Error("Unable to resolve oxlint-tsgolint executable, ...");
const relativePath = relative(process.cwd(), oxlintTsgolintPath);
oxlintTsgolintPath = /^[a-zA-Z]:/.test(relativePath) ? relativePath : `.\\${relativePath}`;

oxlintTsgolintPath is already a valid absolute path at this point. The relative conversion assumes oxlint will run with the same cwd as lint(), which is not true for workspace runs: oxlint receives a path that is relative to the wrong base directory.

(For confirmation: the error string itself is emitted by the oxlint binary, which is correctly reporting that the path it was handed does not exist. The bad value originates here in vite-plus.)

Suggested fix

Keep the resolved absolute path instead of converting it to a launcher-relative path:

if (!oxlintTsgolintPath) throw new Error("Unable to resolve oxlint-tsgolint executable, ...");
// keep the absolute path: oxlint may be spawned with a different cwd (e.g. the workspace
// package dir under `vp run -r`), where a root-relative path would not resolve.

i.e. drop the two relativePath lines. If a relative path is required for some other reason, it should be computed against the directory oxlint is actually spawned in, not the launcher's process.cwd().

Workaround

A local pnpm patch of [email protected] that removes the relative conversion makes vp lint work correctly across all workspace packages (or use WSL).

Steps to reproduce

  1. pnpm workspace with a package under packages/lib (its own lint script calling vp lint).
  2. .pnpm exists only at the repo root (standard pnpm layout).
  3. On Windows, run vp run -r lint from the repo root.
  4. Lint fails with the OXLINT_TSGOLINT_PATH points to '...' which does not exist error.

Only triggers on process.platform === "win32" (the relative conversion is Windows-only).

System Info

  • vite-plus: 0.1.22 (also present unchanged in latest 0.1.24
  • OS: Windows 11
  • Node: v24.15.0
  • pnpm: 10.25.0
  • oxlint 1.63.0 / oxlint-tsgolint 0.22.1

Validations

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue for the same bug.
  • Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
  • The provided reproduction is a minimal reproducible example.

Activity

  1. dm4t2
    added
    pending triage
    on Jun 2, 2026
  2. dm4t2
    added the
    Bug
    issue type on Jun 2, 2026
  3. fengmk2
    added
    bugSomething isn't working
    contribution welcome
    and removed
    pending triage
    on Jun 3, 2026
  4. fengmk2
    added this to the Beta milestone on Jun 3, 2026
  5. semimikoh commented on Jun 4, 2026

    @semimikoh
    semimikoh
    on Jun 4, 2026
    Contributor
    More actions

    Hi! I'd like to work on this.

    The analysis in the issue looks correct — in packages/cli/src/resolve-lint.ts, the Windows-only relative(process.cwd(), ...) conversion downgrades an already-resolved absolute path. That breaks when oxlint is spawned with a different cwd than the launcher (the workspace package dir under vp run -r), since the root-relative .\node_modules\.pnpm\... path no longer resolves.

    I'll open a PR that keeps the resolved absolute path. Could this be assigned to me?

    Reacted by JongKyung Lee
  6. jong-kyung
    assigned
    semimikoh
    on Jun 4, 2026
  7. semimikoh
    added a commit that references this issue on Jun 4, 2026

    fix(cli): keep absolute tsgolint path for workspace lint runs

    This issue will close once commit 40e9b73 is merged into the 'main' branch.
    40e9b73
  8. fengmk2
    closed this as completedin #1758on Jun 4, 2026
  9. jong-kyung
    added a commit that references this issue on Jun 4, 2026

    fix(cli): keep absolute tsgolint path for workspace lint runs (voidze…

    This issue will close once commit 9b9c26d is merged into the 'main' branch.
    9b9c26d
  10. dm4t2 commented on Jun 5, 2026

    @dm4t2
    dm4t2
    on Jun 5, 2026
    Author
    More actions

    Thanks for the quick fix 👍

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

Metadata

Metadata

Assignees

  • @semimikoh
    semimikoh

Labels

bugSomething isn't workingcontribution welcome

Type

Bug

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    • Beta

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.