Skip to content

[Bug]: Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js #5019

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

Closed
3 tasks done
hanf2x opened this issue Mar 23, 2022 · 28 comments
Assignees
Labels
bug Something isn't working high-priority This issue needs to be resolved ASAP
Milestone

Comments

@hanf2x
Copy link

hanf2x commented Mar 23, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: google chrome
  • Local OS: ubuntu
  • Remote OS: ubuntu
  • Remote Architecture: amd64
  • code-server --version: 1.64.2

Steps to Reproduce

  1. yo code to create a new vscode plugin
  2. Start debug the extension
  3. vscode in new window shows
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js
VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code
Source: Typescript and Javascript Language Features (Extension)

Expected

should not happen

Actual

  1. vscode in new window shows
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js
VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code
Source: Typescript and Javascript Language Features (Extension)

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I had tried to go into /usr/lib/code-server and run yarn, but no luck, where is tsserver.js?

@hanf2x hanf2x added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 23, 2022
@imwux
Copy link

imwux commented Mar 23, 2022

I have the same issue

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 23, 2022

I cannot reproduce on macOS

image

where is tsserver.js

Could be this file 🤔 but not 100% sure:
https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/tsServer/server.ts

VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code
Source: Typescript and Javascript Language Features (Extension)

Do you have a firewall or virus tool installed? And did you try reinstalling the extension like it suggests?

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 23, 2022

More info here maybe: microsoft/vscode#72721

@gghub77
Copy link

gghub77 commented Mar 23, 2022

This was missing /usr/lib/code-server/lib/vscode/extensions/node_modules/typescript/lib , it affected vscode.typescript-language-features looking for tsserver.js and html-language-features looking for typescript.js . I took the typescript dir from another install and no more errors

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 23, 2022

@code-asher does this ring a bell? It seems very odd that we would be missing one file.

Otherwise I can look into it. I couldn't reproduce though.

@matt-teix
Copy link

Also have this issue after updating this morning

@Inky1003
Copy link

Also had the issue updating It now. 4.1.0 seems to work fine. Using userLAnd, Ubuntu and install.sh

@gghub77
Copy link

gghub77 commented Mar 23, 2022

node_modules/typescript

The whole typescript dir wasn't there for me under node_modules

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 23, 2022

Wow...I wonder if it's Linux only then 🤔

For anyone else having this issue, please give a 👍🏼 to the first comment so we can gauge how many people are affected by this.

@jsjoeio jsjoeio added needs-investigation This issue needs to be further investigated high-priority This issue needs to be resolved ASAP and removed triage This issue needs to be triaged by a maintainer labels Mar 23, 2022
@jsjoeio jsjoeio added this to the April 2022 milestone Mar 23, 2022
@imwux
Copy link

imwux commented Mar 24, 2022

I can add that I am also running it on linux, the issue appeared when updating to 4.2.0.

@bdefore
Copy link

bdefore commented Mar 24, 2022

I'm also experiencing this following a yay update to 4.2.0 with code-server self-hosting on Manjaro. My case is more general than the original submitter - my steps to reproduce don't involve creating a plugin, just to open my browser to code-server.

@imwux
Copy link

imwux commented Mar 24, 2022

I'm also experiencing this following a yay update to 4.2.0 with code-server self-hosting on Manjaro. My case is more general than the original submitter - my steps to reproduce don't involve creating a plugin, just to open my browser to code-server.

same here, anytime I open a file it pops up essentially

@chientrm
Copy link

Thing work fine with code-server 4.1.0. However, I can only login Github Copilot with code-server 4.2.0.

@h4ck4life
Copy link

I'm affected as well after updated to 4.2.0 .

4.1.0 has no issue.

Ubuntu 20.04

@ArtCore7
Copy link

ArtCore7 commented Mar 26, 2022

Same Issue with 4.2.0 on:

Debian GNU/Linux 11 (bullseye)

For everyone who wants to go back to 4.1.0 with install.sh OneLiner:

https://code-server.dev/install.sh | sh -s -- --version 4.1.0
sudo systemctl restart code-server@$USER

@ppedrotti
Copy link

I also have the issue with 4.2.0 on Debian 11, downgrading to 4.1.0 solved the issue. Installed using npm.

@pottiera
Copy link

Same issue on macOS 12.3

@yokowasis
Copy link

This was missing /usr/lib/code-server/lib/vscode/extensions/node_modules/typescript/lib , it affected vscode.typescript-language-features looking for tsserver.js and html-language-features looking for typescript.js . I took the typescript dir from another install and no more errors

Can you upload the folder here, and where to put it ?

@aghasemi
Copy link

Same issue here. Happened after upgrading to 4.2.0 and I don't want to downgrade because of Jupyter notebooks :D

@cxy930123
Copy link

Put typescript package at /usr/lib/code-server/lib/vscode/extensions/node_modules/typescript

$ npm i typescript
$ sudo mkdir /usr/lib/code-server/lib/vscode/extensions/node_modules
$ sudo cp -r node_modules/typescript/ /usr/lib/code-server/lib/vscode/extensions/node_modules/

@yokowasis
Copy link

Put typescript package at /usr/lib/code-server/lib/vscode/extensions/node_modules/typescript

$ npm i typescript
$ sudo mkdir /usr/lib/code-server/lib/vscode/extensions/node_modules
$ sudo cp -r node_modules/typescript/ /usr/lib/code-server/lib/vscode/extensions/node_modules/

Thanks. I can confirm this is working.

@Alirezaja1384
Copy link

Alirezaja1384 commented Mar 28, 2022

Put typescript package at /usr/lib/code-server/lib/vscode/extensions/node_modules/typescript

$ npm i typescript
$ sudo mkdir /usr/lib/code-server/lib/vscode/extensions/node_modules
$ sudo cp -r node_modules/typescript/ /usr/lib/code-server/lib/vscode/extensions/node_modules/

Thanks. Your solution gave me an idea to fix it. It seems to work like mine.
It seems (at least in my case) there's no node_modules in /usr/lib/code-server/lib/vscode/extensions directory.
Personally, I use this:

cd /usr/lib/code-server/lib/vscode/extensions
sudo npm init -y
sudo npm i typescript

Obviously, this solution is meant to be temporary (until the real bug fix be applied). But at least, it works :)

@drmrbrewer
Copy link

drmrbrewer commented Mar 28, 2022

I had the same problem (Ubuntu 20.04) and the solution from @Alirezaja1384 works for me (thanks)... didn't try the one from @cxy930123 but probably it does the same thing? Also in my case there was no node_modules in /usr/lib/code-server/lib/vscode/extensions before running the npm fix but there is after (with just typescript inside).

@M4TH76
Copy link

M4TH76 commented Mar 28, 2022

For the linuxserver/code-server/ docker container users here the fix:

log in the container console and type:

cd /app/code-server/lib/vscode/extensions
npm init -y
npm i typescript

reload your browser

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 28, 2022

@code-asher any ideas on this? Did we forget something in one of our patches?

code-asher added a commit to code-asher/code-server that referenced this issue Mar 29, 2022
This was caused by switching to Code's package step which does not
include the package.json.

Fixes coder#5019.
code-asher added a commit to code-asher/code-server that referenced this issue Mar 29, 2022
This was caused by switching to Code's package step which does not
include the package.json.

Fixes coder#5019.
code-asher added a commit to code-asher/code-server that referenced this issue Mar 29, 2022
This was caused by switching to Code's package step which does not
include the package.json.

Fixes coder#5019.
code-asher added a commit to code-asher/code-server that referenced this issue Mar 29, 2022
This was caused by switching to Code's package step which does not
include the package.json.

Fixes coder#5019.
@ZauberNerd
Copy link

@jsjoeio do you plan on releasing a fix version for this or do we need to downgrade to 4.1.0 / wait for 4.3.0?

@jsjoeio
Copy link
Contributor

jsjoeio commented Apr 6, 2022

@ZauberNerd yes, this fix will be in the next release!

@its-dibo
Copy link

same here

@jsjoeio jsjoeio modified the milestones: April 2022, 4.3.0 Apr 13, 2022
TinLe pushed a commit to TinLe/code-server that referenced this issue Apr 23, 2022
* Use --exclude to skip node_modules

Instead of copying and then deleting them.  This will also catch some
node_modules directories that were missed.

* Remove per-extension dependency install

Code packages all the dependencies using webpack for each extension so
there are no dependencies to install.

* Include source maps

I also moved this to its own patch because it feels sufficiently
standalone.

Fixes coder#5026.

* Refresh language patch

The base is slightly different so it needed to be refreshed.

* Add missing package.json

This was caused by switching to Code's package step which does not
include the package.json.

Fixes coder#5019.

* Include keytar

It seems this actually is used now.
@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority This issue needs to be resolved ASAP
Projects
None yet
Development

No branches or pull requests