question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language server fails to start with error "unregistered dependency token"

See original GitHub issue

Howdy, I’m new to Elm and while trying to get setup ran into some problems. Hopefully this is an obvious user error, but if not may be a bug.

Expected Behavior

When opening a folder containing a valid Elm project in VSCode we expect the language server to start and for its functions to work.

Current Behavior

When opening a folder containing a valid Elm project (from Elm init) VSCode raises 3 error notifications. image

Elm output shows the following logs

[Info  - 9:52:55 PM] Loading Elm tree-sitter syntax from ..\..\..\.vscode\extensions\elmtooling.elm-ls-vscode-2.4.0\server\out\tree-sitter-elm.wasm
[Info  - 9:52:56 PM] No elm.json found
[Error - 9:52:56 PM] Server initialization failed.
  Message: Request initialize failed with message: Attempted to resolve unregistered dependency token: "ElmWorkspaces"
  Code: -32603 
[Error - 9:52:56 PM] Starting client failed
  Message: Request initialize failed with message: Attempted to resolve unregistered dependency token: "ElmWorkspaces"
  Code: -32603 

Steps to Reproduce (for bugs)

This bug may not be reproducible. But for me…

  1. Open either a personal project or the elm-spa-example project with vscode.
  2. Observe vscode display the three error notifications shown above.

Context

I have not had this working before, I’m new to elm and was trying to get setup when I ran into this issue.

Your Environment

  • Elm Extension: 2.4.1 (also appears on 2.4.0)
  • Windows 11: Version 10.0.22000 Build 22000
  • VSCode: 1.65.2
  • Elm: 0.19.1 (Installed with windows package manager, available in PATH)
  • Node: v16.14.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
razzeeecommented, Mar 19, 2022

Yeah, we deliberatly don’t index anything in elm-stuff or node_modules folders

1reaction
razzeeecommented, Mar 19, 2022

I think the trouble starts with not being able to find the elm.json. You end up here, https://github.com/elm-tooling/elm-language-server/blob/b22398b3398b20640cbdd9cc6d6b70a14826b800/src/server.ts#L107, you might want to try to remove elm-stuff and rerun elm init maybe evenelm install (even if that errors without params, it still downloads stuff in the background)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when using elm-language-server with neovim and coc
Hi, I'm trying to set up neovim and coc with elm language server. ... Attempted to resolve unregistered dependency token: "ElmWorkspaces".
Read more >
Language Server Protocol Specification - 3.17
If a server or client receives a request starting with '$/' it must error the request with error code MethodNotFound (e.g. -32601 )....
Read more >
Multiple Dependency Inection Tsyringe - Stack Overflow
I'm getting the following error: Attempted to resolve unregistered dependency token. If I do the code below works fine, but i would like...
Read more >
[ANN] Julia support for vim/neovim plugin ALE (Asyncronous ...
The LanguageServer.jl package has still room for improvement, but I believe this is a good ... It seems the dependency StaticLint.jl is not...
Read more >
Release Notes for Oracle WebLogic Server
An unexpected error condition is noted in the WebLogic Server Administration Console when configuring a security role for a newly created Coherence cluster ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found