Skip to content

Missing globals and files in vue-tsc checker in a pnpm workspace #610

@barclayadam

Description

@barclayadam

Describe the bug

Running vite-plugin-checker with vue-tsc we are getting a lot of errors, and the checker is not actually running:

vite dev --mode dev

[oxlint] Found 0 error and 0 warning

  VITE v7.1.10   dev   ready in 3737 ms

  ➜  Local:   https://localhost:5010/
  ➜  Network: use --host to expose
  ➜  Vue DevTools: Open https://localhost:5010/__devtools__/ as a separate window
  ➜  Vue DevTools: Press Alt(⌥)+Shift(⇧)+D in App to toggle the Vue DevTools
  ➜  Debug:   https://localhost:5010/__debug
  ➜  press h + enter to show help
[oxlint] Found 0 error and 0 warning
[oxlint] Found 0 error and 0 warning (x2)

 ERROR(vue-tsc)  Cannot find global type 'Boolean'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'CallableFunction'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'Function'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'IArguments'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'NewableFunction'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'Number'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  Cannot find global type 'Object'.
 FILE  undefined:

undefined

 ERROR(vue-tsc)  File 'D:/Projects/Signature365/node_modules/.pnpm/vite-plugin-checker@0.11.0__37b1a3b25b903169a9126bffc32a9da7/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/lib.dom.d.ts' not found.
  The file is in the program because:
    Library 'lib.dom.d.ts' specified in compilerOptions
 FILE  undefined:

undefined

 ERROR(vue-tsc)  File 'D:/Projects/Signature365/node_modules/.pnpm/vite-plugin-checker@0.11.0__37b1a3b25b903169a9126bffc32a9da7/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/lib.dom.iterable.d.ts' not found.
  The file is in the program because:
    Library 'lib.dom.iterable.d.ts' specified in compilerOptions
 FILE  undefined:

undefined

[vue-tsc] Found 9 errors. Watching for file changes.

Reproduction

  • Install, in a pnpm workspace the below packages:
    vite: ^7.1.7
    vite-plugin-checker: ^0.11.0
    typescript: ~5.8.3
    vue-tsc: ^3.1.1
  • Configure in Vite:
checker({
            vueTsc: {
                tsconfigPath: 'tsconfig.app.json',
            },
            oxlint: {
                lintCommand: 'oxlint',
            },
        })
  • Run Vite

Expected behavior

The error from vue-tsc to be reported, or "no errors" printed.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 165H
    Memory: 18.77 GB / 63.46 GB
  Binaries:
    Node: 24.7.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.5.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.17.0 - C:\Users\AdamBarclay(Symprex)\AppData\Local\Microsoft\WinGet\Links\pnpm.EXE
    bun: 1.2.18 - C:\Users\AdamBarclay(Symprex)\AppData\Local\Microsoft\WinGet\Links\bun.EXE
  Browsers:
    Chrome: 142.0.7444.135
    Edge: Chromium (140.0.3485.54)
    Firefox: 144.0.2 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    vite-plugin-checker: catalog:build => 0.11.0

Additional context

I can confirm the folder referenced in the error messages exists ('D:/Projects/Signature365/node_modules/.pnpm/vite-plugin-checker@0.11.0__37b1a3b25b903169a9126bffc32a9da7/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/) but that lib.dom.d.ts does not.

TypeScript config files:

ts.config.json

{
  "files": [],
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.node.json" },
    { "path": "./tsconfig.worker.json" }
  ]
}

ts.config.app.json

{
  "extends": "@vue/tsconfig/tsconfig.dom.json",

  "include": ["src/**/*", "src/**/*.vue"],
  "exclude": ["src/**/__tests__/*"],

  "compilerOptions": {
    "target": "ES2023",

    "lib": [
      "ES2023",
      "DOM",
      "DOM.Iterable"
    ],

    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

    "verbatimModuleSyntax": false,

    "types": ["./env.d.ts", "./auto-imports.d.ts", "json-schema", "lodash-es", "vitest", "vitest/globals"],

    "paths": {
      "src/*": [
        "./src/*"
      ],
      "components/*": [
        "./src/components/*"
      ],
      "layouts/*": [
        "./src/layouts/*"
      ],
      "pages/*": [
        "./src/pages/*"
      ],
      "assets/*": [
        "./src/assets/*"
      ],
      "boot/*": [
        "./src/boot/*"
      ],
      "symprex-common-web/*": [
        "./src/symprex-common-web/*"
      ]
    }
  }
}

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions