TypeError this._getServerWorkingDir(...).then(...).finally is not a function
extension.js:1:395787 d.createMessageTransports
extension.js:1:226888 d.createConnection
extension.js:1:217342 d.start
extension.js:1:130234 _
|
private _getServerWorkingDir(options?: { cwd?: string }): Promise<string | undefined> { |
|
let cwd = options && options.cwd; |
|
if (!cwd) { |
|
cwd = this.clientOptions.workspaceFolder |
|
? this.clientOptions.workspaceFolder.uri.fsPath |
|
: this._mainGetRootPath(); |
|
} |
|
if (cwd) { |
|
// make sure the folder exists otherwise creating the process will fail |
|
return new Promise(s => { |
|
fs.lstat(cwd!, (err, stats) => { |
|
s(!err && stats.isDirectory() ? cwd : undefined); |
|
}); |
|
}); |
|
} |
|
return Promise.resolve(undefined); |
|
} |
I see this error in the telemetry of our VS Code extension. If I try to search the error on the Internet, I can find a single StackOverflow post talking about the same thing. I have looked at the code and tried writing a small JavaScript program but can't quite figure out in what case this might happen. We are on 9.0.1 of vscode-languageclient.
vscode-languageserver-node/client/src/node/main.ts
Lines 573 to 589 in df56e72
I see this error in the telemetry of our VS Code extension. If I try to search the error on the Internet, I can find a single StackOverflow post talking about the same thing. I have looked at the code and tried writing a small JavaScript program but can't quite figure out in what case this might happen. We are on 9.0.1 of
vscode-languageclient.