"Cannot read property 'lastIndexOf' of undefined" error in tsserver.js 路 Issue #43105 路 microsoft/TypeScript (original) (raw)

Bug Report

馃攷 Search Terms

馃晽 Version & Regression Information

馃捇 Steps to reproduce

This happens consistently for me in the OmniSharp/omnisharp-vscode repository, when opening a typescript file with 4.2 installed.

  1. git clone https://github.com/OmniSharp/omnisharp-vscode.git
  2. cd omnisharp-vscode
  3. npm install
  4. npm install -g typescript@4.2.2
  5. code .
  6. Configure vscode to use the global ts server (for me this is "typescript.tsdk": "C:\\Users\\phil\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib",)
  7. Restart code
  8. Open the TypeScript output to view errors

馃檨 Actual behavior

The TypeScript language server crashes. Attached is a sample log:
tsserver.zip

馃檪 Expected behavior

It to not crash.

There's a couple of related issues in vscode repo such as microsoft/vscode#115905