Skip to content

TypeScript plugin extensions don't load on Windows in 1.64.0 #142139

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
dsherret opened this issue Feb 4, 2022 · 11 comments
Closed

TypeScript plugin extensions don't load on Windows in 1.64.0 #142139

dsherret opened this issue Feb 4, 2022 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues windows VS Code on Windows issues

Comments

@dsherret
Copy link

dsherret commented Feb 4, 2022

  • VS Code Version: 1.64.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Load an extension that uses a TypeScript server plugin like:

With tsserver logs enabled, you will notice the following in the logs:

Info 0    [18:48:17.280] Starting TS Server
Info 1    [18:48:17.281] Version: 4.5.5
Info 2    [18:48:17.281] Arguments: C:\Users\david\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\david\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\david\AppData\Local\Temp\vscode-typescript\43a6ae4ad4818b5f148f\tscancellation-46d2cad07af3976cd9e1.tmp* --logVerbosity verbose --logFile c:\Users\david\AppData\Roaming\Code\logs\20220203T181651\exthost7\vscode.typescript-language-features\tsserver-log-Hl2L4q\tsserver.log --globalPlugins typescript-deno-plugin --pluginProbeLocations /c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
Info 3    [18:48:17.281] Platform: win32 NodeVersion: 14 CaseSensitive: false
...
Info 18   [18:48:17.298] Loading global plugin typescript-deno-plugin
Info 19   [18:48:17.298] Enabling plugin typescript-deno-plugin from candidate paths: /c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1,c:/Users/david/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/tsserver.js/../../..
Info 20   [18:48:17.298] Loading typescript-deno-plugin from /c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1 (resolved to C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules)
Info 21   [18:48:17.309] Loading typescript-deno-plugin from c:/Users/david/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/tsserver.js/../../.. (resolved to c:/Users/david/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/node_modules)
Info 22   [18:48:17.310] Failed to load module 'typescript-deno-plugin' from C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules: Error: Could not resolve JS module 'typescript-deno-plugin' starting at 'C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules'. Looked in: C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules/typescript-deno-plugin/package.json, C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules/typescript-deno-plugin.js, C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules/typescript-deno-plugin.jsx, C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules/typescript-deno-plugin/index.js, C:/c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1/node_modules/typescript-deno-plugin/index.jsx,
...etc...

Cause?

This may be because vscode started to provide a pluginProbeLocations to tsserver in the following format:

--pluginProbeLocations /c:/Users/david/.vscode/extensions/denoland.vscode-deno-3.10.1

Previously in 1.63 it used this format:

--pluginProbeLocations c:\Users\david\.vscode\extensions\denoland.vscode-deno-3.10.1

So it's now resolving /c:/ to C:/c:/ within ts server.

I will keep investigating.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 4, 2022

Likely caused by fd745e7

Will push a potential fix but please test on the next insiders build to confirm it works. I don't have a window machine setup to test this easily

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues labels Feb 4, 2022
@mjbvz mjbvz added this to the February 2022 milestone Feb 4, 2022
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 4, 2022

\fixedBy df09257

@mjbvz mjbvz closed this as completed Feb 4, 2022
@dsherret
Copy link
Author

dsherret commented Feb 4, 2022

@mjbvz ok thanks, I will try it out in the next insiders. To be honest, I'm surprised there's no integration tests for TypeScript server plugins that could be tested on a Windows CI though. I guess there's not much guarantee TypeScript plugins won't stop loading again in the future.

Also, this seems like a pretty critical bug. I think many extensions won't work on Windows anymore.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 4, 2022

We can backport it if the fix works. This is the first report we're seeing of it though

@csvn
Copy link
Contributor

csvn commented Feb 4, 2022

I've encountered the same issue in a small Deno project, where the extension stopped working after the new VSCode version. Updating to Insiders fixed the issue for me.

image

Will there be a new version of VSCode that fixes this regression? Just curious about a rough timeline when I can switch back to Stable for this project.

@dsherret
Copy link
Author

dsherret commented Feb 4, 2022

It's also now fixed for me in the latest insiders:

--pluginProbeLocations c:\Users\david\.vscode-insiders\extensions\denoland.vscode-deno-3.10.1

I also don't see any trace of any /c:/ like paths in the ts server logs anymore.

@lucacasonato
Copy link

I really don't want to be pushy, but we have a lot of users on our end running into this issue. All extensions that include TS compiler plugins are broken on Windows in 1.64. Could this be considered for a 1.64.1 patch release?

Even the official Microsoft TSLint extension (ms-vscode.vscode-typescript-tslint-plugin) does not work in 1.64 :-) (See #142244)

@jasonwilliams
Copy link
Contributor

I agree with @lucacasonato. Everyone currently using Styled Components is affected and we've had many users bring this up also. I think this is important enough for a patch release.

@brooketopcoder
Copy link

I'd like to up-vote this fix as well. As you can see in my other report of this bug, #142244, this is really poor timing for this to break b/c I got my entire team to switch to this linting configuration, and it breaks literally the next day.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 7, 2022

Thanks for testing. We'll take this into the 1.64 second recovery

@dojyorin
Copy link

dojyorin commented Feb 8, 2022

Thank you for working on the fix.
I posted a temporary workaround by denoland/vscode_deno#620 (comment) until 1.64 Recovery is released.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues typescript Typescript support issues windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

7 participants