-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
General error using the extension: TypeError: Cannot read property 'range' of undefined
#445
Comments
Thanks for reporting it, i've moved it to the vscode haskell extension project, as it seems specific to it. |
I met the same issue with master branch hls
Maybe a reference: I met a similar error, it is caused by the previous return value, so I changed it. haskell/haskell-language-server#2129 |
TypeError: Cannot read property 'range' of undefined
Fixed by haskell/haskell-language-server#2169, it will be available in the next hls release (1.4.0) |
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.3.0.0 (GHC: 8.10.4) (PATH: /Users/rob/.ghcup/bin/haskell-language-server-wrapper-1.3.0) (GIT hash: e7c5e90b6df5dff2760d76169eddaea3bdd6a831) Tool versions found on the $PATH cabal: 3.4.0.0 stack: Not found ghc: 8.10.4
Which OS do you use: macOS
Which lsp-client do you use: VS Code
Describe your project (alternative: link to the project): N/A (happens in every Haskell project I open)
Steps to reproduce
Given that nobody else has reported it, I’m guessing it’ll be pretty hard to repro.
Expected behaviour
The outline should be populated, the go to symbol in editor list should be populated.
Actual behaviour
The outline is empty (“No symbols found in document ‘….hs’”). The go to symbol in editor list is empty (“No editor symbols”).
Furthermore if you run the “Open Webview Developer Tools” command, you get a standard Chromium web inspector view, and in the console, an error:
With some difficulty I was able to discover in the listed file that the function
H
is indeed callinge.location.range
and thus presumablye.location
is undefined. Minified JS is not especially elucidating, I didn’t know where to find source maps, and tbh I need to get on with things, so I stopped there.Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:the logs
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: