theia icon indicating copy to clipboard operation
theia copied to clipboard

Vue extension (offical) fails on server connection

Open CannyDuck opened this issue 5 months ago • 4 comments

Bug Description:

After installation the Vue extension it failed to start with the following error:

`Error: Cannot find module './typescript.js' Require stack:

  • c:\Users....theia-ide\deployedPlugins\vue.volar-3.1.3\extension\dist\language-server.js at Module._resolveFilename (node:internal/modules/cjs/loader:1408:15) at require.resolve (node:internal/modules/helpers:145:19) at Object. (c:\Users....theia-ide\deployedPlugins\vue.volar-3.1.3\extension\dist\language-server.js:13298:22206) at Module._compile (node:internal/modules/cjs/loader:1738:14) at Module._extensions..js (node:internal/modules/cjs/loader:1904:10) at Module.load (node:internal/modules/cjs/loader:1472:32) at Module._load (node:internal/modules/cjs/loader:1289:12) at c._load (node:electron/js2c/node_init:2:18013) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:242:24) { code: 'MODULE_NOT_FOUND', requireStack: [ 'c:\Users\...\.theia-ide\deployedPlugins\vue.volar-3.1.3\extension\dist\language-server.js' ] }

Node.js v22.17.0 [Error - 13:11:05] Server process exited with code 1.`

Steps to Reproduce:

  1. Fresh installation of Theia IDE
  2. install official Vue extension (https://code.visualstudio.com/docs/nodejs/vuejs-tutorial#_vue-official-extension)

CannyDuck avatar Nov 07 '25 13:11 CannyDuck

Hey @CannyDuck,

I don't think there's a lot we can do to fix this. The Vue extension expects a very specific file layout, which the Theia IDE does not provide. More explicitly, it expects that the IDE comes with some version of TypeScript (which is only a dev-dependency of Theia).

IMO, this is on the Vue extension team to fix, since they use undocumented behavior of VSCode, which we don't want to reproduce. VS Code explicitly recommends against importing VS Code's dependencies, since they might change between versions in unexpected ways. The extension should instead offer to supply a setting that allows users to point to the installation directory of TypeScript. This is how other extensions do that AFAIK.

msujew avatar Nov 08 '25 01:11 msujew

Are you able to provide a PR for that in the Vue extension? Sorry I don't have the skills for that.

https://github.com/vuejs/language-tools/issues/5741#issuecomment-3506704132

CannyDuck avatar Nov 08 '25 20:11 CannyDuck

https://github.com/vuejs/language-tools/pull/5691

KazariEX avatar Nov 09 '25 06:11 KazariEX

Thanks a lot. Sorry, can you tell me how to handle the --tsdk parameter?

CannyDuck avatar Nov 09 '25 07:11 CannyDuck