"Couldn't start client Terraform LS" error despite installing language server via extension/brew
See original GitHub issueExtension version:
2.14.0
My Environment
- macOS Big Sur 11.5.1
- VSCode 1.58.2 (Universal)
Expected Behavior
- When I run the command
Terraform: Enable Language Server, the command should validate open.tffiles.
Actual Behavior
- When I run the command
Terraform: Enable Language Server, I get an error message “Couldn’t start client Terraform LS”.
Steps to reproduce the problem (?)
- Install extension
- Open a
.tffile (?) - Accept prompt to install
0.20.0version of Terraform language server. Reload VSCode
OR
- Install Language Server via brew with
brew install hashicorp/tap/terraform-ls - Install extension
- Configure
settings.jsonas follows:
"terraform.languageServer": {
"external": true,
"pathToBinary": "/usr/local/bin/terraform-ls",
"args": [
"serve"
],
"maxNumberOfProblems": 100,
"trace.server": "off"
},
- Open a
.tffile (?)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (5 by maintainers)
Top Results From Across the Web
VS Code terraform extension error :Couldn't start client ...
You have to run terraform init so that the language server knows which schema to use. The extension itself doesn't seem to tell...
Read more >VSCode: Terraform Module Calls not working
and it now exists in /usr/local/bin/terraform-ls , as does the Terraform executable itself. So I rewrite the Terraform config in settings.
Read more >How to Install, Update, Enable and Disable Language Server ...
So in this quick post, I will help you to Install, Update, Enable and Disable Language Server.
Read more >VS Code Terraform Language Server crash. - Reddit
I just realized that the Terraform-ls server is crashing all the time. First I was wondering, why doesn't autocomplete and snippets work?
Read more >Enabling VS Code Terraform extension code completion on ...
As I'm writing more and more Terraform definitions, I've decided to make Terraform definition input c... Tagged with terraform, vscode, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Based on the file paths, it looks like you installed the extension into VS Codium or similar build of VS Code, which generally doesn’t install from the MS Marketplace. The latest builds on OpenVSX - which you likely used - are currently broken, because of an older version of ovsx was used which doesn’t support multi-platform extensions. We are currently blocked by https://github.com/eclipse/openvsx/issues/450
Since v2.20.0 we embed the LS binary in the extension itself (within vsix), so folks who consume the extension via official VS Code builds and MS Marketplace should no longer face this error.
We track OpenVSX publishing under https://github.com/hashicorp/vscode-terraform/pull/1064
@AllAwesome497 We also provide
terraform-lspackage for various Linux distributions, so you don’t have to build LS yourself: https://www.hashicorp.com/official-packaging-guide (terraform-lsis the package name).I’m going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.