marko-js / language-server

Marko autocomplete, intellisense and editor support.
MIT License
37 stars 8 forks source link

Marko Plugin is crashing the Typescript language service #223

Closed AngusMorton closed 7 months ago

AngusMorton commented 7 months ago

marko-vscode@1.1.9

Opening any TypeScript file causes the language service to crash with the error message:

The JS/TS language service immediately crashed 5 times. The service will not be restarted. This may be caused by a plugin contributed by one of these extensions: Marko-JS.marko-vscode. Please try disabling these extensions before filing an issue against VS Code.

I haven't been able to reproduce this in a smaller shareable project yet, but I'll update this description when I have.

Stacktrace

2023-11-23 13:56:01.342 [error] Error: TypeScript Server Error (5.2.2) Cannot read properties of undefined (reading 'resolutions') TypeError: Cannot read properties of undefined (reading 'resolutions')

Workaround

Downgrading to 1.0.19 solves the problem. 1.0.20 and above crash.

Your Environment

The project is a pnpm monorepo, which may be related...

Related Issues

This looks like the same issue as https://github.com/marko-js/language-server/issues/155.

AngusMorton commented 7 months ago

Closing because this was a problem with our tsconfig.json.

Our tsconfig.json included settings for "rootDir": "../../" and "baseUrl": "./", which were unnecessary - removing those options fixes this issue.