Skip to content

Commit c95d6c2

Browse files
authored
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.
1 parent d3be7e1 commit c95d6c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/project.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,8 +2106,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
21062106
// Search any globally-specified probe paths, then our peer node_modules
21072107
return [
21082108
...this.projectService.pluginProbeLocations,
2109-
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
2110-
combinePaths(this.projectService.getExecutingFilePath(), "../../.."),
2109+
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/
2110+
// later we will append node_modules back on to resolve the plugin location
2111+
combinePaths(this.projectService.getExecutingFilePath(), "../../../.."),
21112112
];
21122113
}
21132114

@@ -3204,3 +3205,4 @@ export function isBackgroundProject(project: Project): project is AutoImportProv
32043205
export function isProjectDeferredClose(project: Project): project is ConfiguredProject {
32053206
return isConfiguredProject(project) && !!project.deferredClose;
32063207
}
3208+

0 commit comments

Comments
 (0)