Skip to content

Commit

Permalink
fix(semantics): resolving tsserver client (#7207)
Browse files Browse the repository at this point in the history
  • Loading branch information
luvkapur authored Mar 28, 2023
1 parent c4c1c9d commit d9d8296
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scopes/typescript/ts-server/ts-server-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,16 @@ export class TsserverClient {
return this.options.tsServerPath;
}
const tsServerPath = path.join('typescript', 'lib', 'tsserver.js');
// 1) look into .yarn/sdks of workspace root
const sdk = findPathToYarnSdk(this.projectPath, tsServerPath);
if (sdk) {
return sdk;
}
// 2) look into node_modules of workspace root
// 1) look into node_modules of workspace root
const executable = findPathToModule(this.projectPath, tsServerPath);
if (executable) {
return executable;
}
// 2) look into .yarn/sdks of workspace root
const sdk = findPathToYarnSdk(this.projectPath, tsServerPath);
if (sdk) {
return sdk;
}
// 3) use globally installed tsserver
if (commandExists.sync(getTsserverExecutable())) {
return getTsserverExecutable();
Expand Down

0 comments on commit d9d8296

Please sign in to comment.