Skip to content

vue-tsc can't handle single file: parseJsonConfigFileContent is not defined #5707

@Imgodmaoyouknow

Description

@Imgodmaoyouknow

Vue - Official extension or vue-tsc version

3.1.1

VSCode version

1.100.3

Vue version

TypeScript version

5.9.3

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600KF
    Memory: 11.94 GB / 31.82 GB
  Binaries:
    Node: 22.14.0 - D:\soft\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Users\Kiyotaka\AppData\Local\pnpm\yarn.CMD
    npm: 10.9.2 - D:\soft\nodejs\npm.CMD
    pnpm: 10.18.1 - C:\Users\Kiyotaka\AppData\Local\pnpm\pnpm.CMD
    bun: 1.2.20 - C:\Users\Kiyotaka\.bun\bin\bun.EXE
  Browsers:
    Chrome: 140.0.7339.208
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.26100.1882

package.json dependencies

{
  "dependencies": {
    "typescript": "^5.9.3",
    "vue-tsc": "^3.1.1"
  }
}

Steps to reproduce

// index.ts
const a: number = "a";
npm init
npm install vue-tsc
npx vue-tsc index.ts --noEmit

What is expected?

index.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'.

1 const a: number = "1"
~

Found 1 error in index.ts:1

What is actually happening?

D:\test code\test 1\node_modules\.pnpm\v[email protected][email protected]\node_modules\vue-tsc\index.js:36
            throw err;
            ^

ReferenceError: parseJsonConfigFileContent is not defined
    at eval (eval at get (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:122085:240), <anonymous>:1:1)
    at Object.get (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:122085:240)
    at Object.createParsedCommandLineByJson (D:\test code\test 1\node_modules\.pnpm\@[email protected][email protected]\node_modules\@vue\language-core\lib\compilerOptions.js:27:23)
    at D:\test code\test 1\node_modules\.pnpm\v[email protected][email protected]\node_modules\vue-tsc\index.js:14:20
    at Object.apply (D:\test code\test 1\node_modules\.pnpm\@[email protected]\node_modules\@volar\typescript\lib\node\proxyCreateProgram.js:50:33)
    at performCompilation (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:132244:19)
    at executeCommandLineWorker (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:132086:7)
    at executeCommandLine (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:132133:12)
    at Object.<anonymous> (D:\test code\test 1\node_modules\.pnpm\t[email protected]\node_modules\typescript\lib\tsc.js:133824:1)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)

Node.js v22.14.0

Link to minimal reproduction

No response

Any additional comments?

The issue in typescript(tsc).

Here are my specific investigation results, but I don't know which direction to take to solve the problem next.

Thank you for read this.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions