From c95d6c284a105df0271dbfd2cec7b16ffc624705 Mon Sep 17 00:00:00 2001 From: Ben Delarre Date: Thu, 16 Oct 2025 14:07:49 -0700 Subject: [PATCH] Fix global plugin search paths The global plugin search path was resolving to "X/node_modules/node_modules" due to incorrect number of updirs in the initial path. --- src/server/project.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/project.ts b/src/server/project.ts index 2786ad033a3af..a628f97678e6d 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -2106,8 +2106,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo // Search any globally-specified probe paths, then our peer node_modules return [ ...this.projectService.pluginProbeLocations, - // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - combinePaths(this.projectService.getExecutingFilePath(), "../../.."), + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/ + // later we will append node_modules back on to resolve the plugin location + combinePaths(this.projectService.getExecutingFilePath(), "../../../.."), ]; } @@ -3204,3 +3205,4 @@ export function isBackgroundProject(project: Project): project is AutoImportProv export function isProjectDeferredClose(project: Project): project is ConfiguredProject { return isConfiguredProject(project) && !!project.deferredClose; } +