Language server fails to start with error "unregistered dependency token"
See original GitHub issueHowdy, 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.
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…
- Open either a personal project or the elm-spa-example project with vscode.
- 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:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
Yeah, we deliberatly don’t index anything in
elm-stuff
ornode_modules
foldersI 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 rerunelm init
maybe evenelm install
(even if that errors without params, it still downloads stuff in the background)