Skip to content

Commit 6f8ea44

Browse files
authored
Show Reinstall VSCode Error Message when our Bundled tsserver.js is Missing (microsoft#21690)
* Add resintall message when bundled tsserver.js is missing. Fixes microsoft#21689 * Use common wording for error * Update warning message
1 parent 2c3f743 commit 6f8ea44

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

extensions/typescript/src/typescriptServiceClient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,10 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
394394
if (!fs.existsSync(modulePath)) {
395395
window.showWarningMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. Falling back to bundled TypeScript version.', path.dirname(modulePath)));
396396
modulePath = this.bundledTypeScriptPath;
397-
// TODO check again?
397+
if (!fs.existsSync(modulePath)) {
398+
window.showErrorMessage(localize('noBundledServerFound', 'VSCode\'s tsserver was deleted by a another application such as a misbehaving virus detection tool. Please reinstall VS Code.'));
399+
return reject(new Error('Could not find bundled tsserver.js'));
400+
}
398401
}
399402

400403
let version = this.getTypeScriptVersion(modulePath);

0 commit comments

Comments
 (0)