language-tools: v2.0.29-v2.1.2 incompatibility of vite-plugin-checker with vuejs/language-tools
Vue - Official extension or vue-tsc version
v2.0.29
VSCode version
1.92.2
Vue version
3.4.38
TypeScript version
5.5.4
System Info
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
Memory: 4.32 GB / 14.83 GB
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.7.0 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Edge: Chromium (127.0.2651.86)
Internet Explorer: 11.0.19041.4355
Steps to reproduce
Install version any version between v2.0.29-v2.1.2 and start the Vue 3 vite project.
What is expected?
Vue 3 project should start.
What is actually happening?
Throws this error and fails starting:
node:internal/event_target:1100
process.nextTick(() => { throw err; });
^
TypeError [Error]: pluginContext.vueCompilerOptions.plugins is not iterable
at createPlugins (C:\path\node_modules\@vue\language-core\lib\plugins.js:48:45)
at Object.createVueLanguagePlugin (C:\path\node_modules\@vue\language-core\lib\languagePlugin.js:52:49)
at exports.getLanguagePlugins (C:\path\node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\languagePlugins.cjs:30:33)
at Object.apply (C:\path\node_modules\@volar\typescript\lib\node\proxyCreateProgram.js:50:33)
at getBuilderCreationParameters (C:\path\node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\typescript-vue-tsc\lib\typescript.js:128533:18)
at createSemanticDiagnosticsBuilderProgram (C:\path\node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\typescript-vue-tsc\lib\typescript.js:129027:74)
at synchronizeProgram (C:\path\node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\typescript-vue-tsc\lib\typescript.js:131054:7)
at Object.createWatchProgram (C:\path\node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\typescript-vue-tsc\lib\typescript.js:130960:3)
at Object.configureServer (file:///C:/path/node_modules/vite-plugin-checker/dist/esm/checkers/vueTsc/main.js:103:13)
Emitted 'error' event on Worker instance at:
at [kOnErrorMessage] (node:internal/worker:326:10)
at MessagePort.<anonymous> (node:internal/worker:232:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28)
Node.js v20.11.0
Link to minimal reproduction
No response
Any additional comments?
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 19 (5 by maintainers)
Hey folks. Since plugin checker released this as “major” (in terms of 0.x versioining) version, Nuxt has to update dependency on their side first - and they did that, fix will be available in next patch.
For now, you can pin resolution in any way you like, fix example:
Same issue here, still happens on 2.1.4 using vite plugin checker 0.7.2, works as long as you pin vue-tsc at 2.0.29 for now
This issue only happens when you are between 2.1.0 - 2.1.4
same issue in vue-tsc@2.1.6
I encountered this error when enabling
vue-tscwithvite-plugin-checker.I traced the issue to possibly being caused by this: https://github.com/vuejs/language-tools/blob/v2.1.2/packages/language-core/lib/languagePlugin.ts#L51.
It appears to be an issue caused by incorrect parameter injection.
That does not seem to help, but I noticed a strange thing about this version. If I install the version like this:
"vue-tsc": "2.0.29"it does not throw any errors. But if I install it with the ^ prefix like this:"vue-tsc": "^2.0.29"it throws the error. The version 2.1.2 throws the error with or without ^ prefix. I’ll provide a minimal repro when I have more time available.