cache error on require typescript module
This commit is contained in:
parent
09c17ab751
commit
87e09cfb18
1 changed files with 7 additions and 7 deletions
|
@ -116,15 +116,15 @@ export class TypeScriptVersionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get bundledVersion(): TypeScriptVersion | null {
|
public get bundledVersion(): TypeScriptVersion | null {
|
||||||
|
try {
|
||||||
const file = requireFunc.resolve('typescript')
|
const file = requireFunc.resolve('typescript')
|
||||||
if (!file || !fs.existsSync(file)) {
|
const bundledVersion = new TypeScriptVersion(
|
||||||
|
path.dirname(file),
|
||||||
|
'')
|
||||||
|
return bundledVersion
|
||||||
|
} catch (e) {
|
||||||
workspace.showMessage('Bundled typescript module not found', 'error')
|
workspace.showMessage('Bundled typescript module not found', 'error')
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const bundledVersion = new TypeScriptVersion(
|
|
||||||
path.dirname(file),
|
|
||||||
''
|
|
||||||
)
|
|
||||||
return bundledVersion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue