Skip to content

Running LSP throws error while running default build task #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Viijay-Kr opened this issue Mar 13, 2025 · 5 comments
Open

Running LSP throws error while running default build task #576

Viijay-Kr opened this issue Mar 13, 2025 · 5 comments

Comments

@Viijay-Kr
Copy link

Viijay-Kr commented Mar 13, 2025

Running the prototype LSP inside vscode debugger throws the following error

Image

The configured build task fails before opening Ext host. It doesn't work unless one explicitly runs npm run build inside _extension and then launch the Language service

Would be nice to have this one fixed or the docs is correctly updated.

Might help people without extension API knowledge to be able to test the LSP service

@jakebailey
Copy link
Member

Running npm run build should not be required; the launch task should automatically work. What specifically did you do to make this occur?

@Viijay-Kr
Copy link
Author

  1. I cloned the repo (with submodules)
  2. npm ci in the root
  3. Opened the project in vs code
  4. Ran the Launch VS code debugger config
  5. The extension host opened with an activation error (see image)

I checked the watch/build task in the terminal and saw this error.

Image

From the error I know the _extension dist folder never got generated thus I ran the build inside _extension folder manually and launched the debugger again and this time the extension is activated

I think the npm err seems obvious atleast in my machine, given there is no script called typescript-lsp in root package json

Do i need to do anything before launching the debugger ?

@jakebailey
Copy link
Member

You steps don't include copying launch.template.json to launch.json. Did you do that too?

@Viijay-Kr
Copy link
Author

You steps don't include copying launch.template.json to launch.json. Did you do that too?

Oh yes I did that too

@ocan4214
Copy link

Might be ${workspaceRoot} issue make sure you opened the project in the folder.(code . in terminal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants