javascript-typescript-langserver icon indicating copy to clipboard operation
javascript-typescript-langserver copied to clipboard

Error from the Language Server: Request textDocument/hover failed with message: Cannot read property ’map’ of undefined (Internal Error) [7996 times]

Open twlz0ne opened this issue 5 years ago • 3 comments

Behavior

Without option --log-level:

test-emacs-lsp-typescript-1

With option --log-level:

test-emacs-lsp-typescript-2

Steps to reproduce the behavior

  1. Download test-lsp-typescript-issue535.el to /path/to/test-lsp-typescript-issue535.el

  2. Clone https://github.com/Microsoft/TypeScriptSamples to /path/to/Microsoft/TypeScriptSamples

/path/to/emacs -nw -Q -l \
            /path/to/test-lsp-typescript-issue535.el \
            /path/to/Microsoft/TypeScriptSamples/angular2/app/todo.ts

Environment

  • macOS 10.11.6
  • Emacs 27.0.5
  • node 8.11.3
  • Packages:
    • dash-20180910.1856
    • dash-functional-20180107.1618
    • epl-20180205.2049
    • flycheck-20181018.1021
    • lsp-mode-20181024.338
    • lsp-typescript-20180906.524
    • lsp-ui-20181021.1713
    • markdown-mode-20180904.1601
    • nodenv-20181023.1543
    • pkg-info-20150517.1143
    • typescript-mode-20181018.553

twlz0ne avatar Oct 24 '18 15:10 twlz0ne

Do you have more language server logs? A stack trace maybe?

felixfbecker avatar Oct 24 '18 17:10 felixfbecker

@felixfbecker Once added option --tsserver-path, the issue dispeared:

test-emacs-lsp-typescript-3

Seems lsp-ui depends on option --tsserver-path, if not specified, it will keep asking. Is this the problem?

If just add --log-level=4 --tsserver-log-file=lsp-typescript.log, the log file will not be created. So I can't provide the full trace.

twlz0ne avatar Oct 24 '18 18:10 twlz0ne

This language server does not use tsserver, so I don't know where this is coming from

felixfbecker avatar Oct 24 '18 18:10 felixfbecker