v2.2.3) versionv0.13.4)Unable to install terraform-lsExtension host log:
[2020-10-24 08:31:24.728] [exthost] [error] TypeError: Cannot read property 'url' of undefined
at LanguageServerInstaller.<anonymous> (c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\src\languageServerInstaller.ts:113:29)
at Generator.next (<anonymous>)
at c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\out\languageServerInstaller.js:8:71
at new Promise (<anonymous>)
at __awaiter (c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\out\languageServerInstaller.js:4:12)
at LanguageServerInstaller.installPkg (c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\out\languageServerInstaller.js:98:16)
at LanguageServerInstaller.<anonymous> (c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\src\languageServerInstaller.ts:78:15)
at Generator.next (<anonymous>)
at fulfilled (c:\Users\Marcus\.vscode\extensions\hashicorp.terraform-2.2.3\out\languageServerInstaller.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
Windows 10 1909
For anyone who comes here like I did looking for the solution to this issue, you can work around this issue by installing the terraform-ls independently.
I believe my issue was that I was launching vscode from wsl2. At any rate, I was able to work around it by installing terraform-ls using the below command,
brew install hashicorp/tap/terraform-ls
This how to manually install it on Windows:
terraform-ls from https://releases.hashicorp.com/terraform-ls/%USERPROFILE%\.terraform)js
"terraform.languageServer": {
"external": true,
"pathToBinary": "C:/Users/[USER_NAME]/.terraform/terraform-ls",
"args": [
"serve"
]
},
fwiw, on Ubuntu 18.04 this issue disappeared after i simply removed the extension and re-installed it.
Most helpful comment
fwiw, on Ubuntu 18.04 this issue disappeared after i simply removed the extension and re-installed it.