Volar fails to start in eclipse theia
mind-ar opened this issue · 2 comments
Volar fails to start in eclipse theia because cant find typescript module:
Message: Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in
after some investigation, i found that volar is trying to load the typescript module from extensions/node_modules
, that seems to be the place where vscode contains this module.
volar.js/packages/vscode/lib/features/tsVersion.ts
Lines 156 to 166 in cd3695a
there's a workaround, installing the ms-vscode.vscode-typescript-next
extensions, that uses extensionPath
to find the node_modules
folder (i think that extensionPath is empty so it use the node_modules from de theia folder)
volar.js/packages/vscode/lib/features/tsVersion.ts
Lines 143 to 154 in cd3695a
here's the related issue in theia repo: eclipse-theia/theia#12443
is there any chance to add a fix to this problem (ie, validating that the extensions/node_modules exists)?
Thanks
Volar needs to be able to load TypeScript. Does Theia provide this in some other way?
Note that crash happens in a fallback mechanism. Typically users set the typescript.tsdk
option in their VS Code settings.
@remcohaszing Theia project lead here. Since adopters can use any set of vscode extensions they like, there is no guarantee that a Theia app ships with a TypeScript distribution. IMO the best fix would be to just specify in the error that the typescript.tsdk
needs to be set in the project settings.