typescript-language-server
typescript-language-server copied to clipboard
"Maximum call stack size exceeded" error with Node v23.0.0 in Neovim
I'm getting this error log when trying to start the language server in Neovim. This happens with Node 23.0.0 and not with 22.9.0. I'm using the default LSP settings from nvim-lspconfig to start the server and logging with
vim.lsp.set_log_level 'trace'
if vim.fn.has 'nvim-0.5.1' == 1 then
require('vim.lsp.log').set_format_func(vim.inspect)
end
[INFO][2024-10-19 10:02:14] .../lua/vim/lsp.lua:799 "exit_handler" {}
[START][2024-10-19 10:02:17] LSP logging initiated
[INFO][2024-10-19 10:02:17] .../vim/lsp/rpc.lua:731 "Starting RPC client" {
cmd = { "C:\\Users\\sadguitarius\\AppData\\Local\\nvim-data\\mason\\bin\\typescript-language-server.CMD", "--stdio" },
extra = {
cwd = "C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project"
}
}
[TRACE][2024-10-19 10:02:17] ...m/lsp/client.lua:583 "LSP[ts_ls]" "initialize_params" {
capabilities = {
general = {
positionEncodings = { "utf-16" }
},
textDocument = {
callHierarchy = {
dynamicRegistration = false
},
codeAction = {
codeActionLiteralSupport = {
codeActionKind = {
valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }
}
},
dataSupport = true,
dynamicRegistration = true,
isPreferredSupport = true,
resolveSupport = {
properties = { "edit" }
}
},
completion = {
completionItem = {
commitCharactersSupport = true,
deprecatedSupport = true,
documentationFormat = { "markdown", "plaintext" },
insertReplaceSupport = true,
insertTextModeSupport = {
valueSet = { 1, 2 }
},
labelDetailsSupport = true,
preselectSupport = true,
resolveSupport = {
properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }
},
snippetSupport = true,
tagSupport = {
valueSet = { 1 }
}
},
completionItemKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }
},
completionList = {
itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }
},
contextSupport = true,
dynamicRegistration = false,
insertTextMode = 1
},
declaration = {
linkSupport = true
},
definition = {
dynamicRegistration = true,
linkSupport = true
},
diagnostic = {
dynamicRegistration = false
},
documentHighlight = {
dynamicRegistration = false
},
documentSymbol = {
dynamicRegistration = false,
hierarchicalDocumentSymbolSupport = true,
symbolKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }
}
},
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
},
formatting = {
dynamicRegistration = true
},
hover = {
contentFormat = { "markdown", "plaintext" },
dynamicRegistration = true
},
implementation = {
linkSupport = true
},
inlayHint = {
dynamicRegistration = true,
resolveSupport = {
properties = { "textEdits", "tooltip", "location", "command" }
}
},
publishDiagnostics = {
dataSupport = true,
relatedInformation = true,
tagSupport = {
valueSet = { 1, 2 }
}
},
rangeFormatting = {
dynamicRegistration = true
},
references = {
dynamicRegistration = false
},
rename = {
dynamicRegistration = true,
prepareSupport = true
},
semanticTokens = {
augmentsSyntaxTokens = true,
dynamicRegistration = false,
formats = { "relative" },
multilineTokenSupport = false,
overlappingTokenSupport = true,
requests = {
full = {
delta = true
},
range = false
},
serverCancelSupport = false,
tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },
tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }
},
signatureHelp = {
dynamicRegistration = false,
signatureInformation = {
activeParameterSupport = true,
documentationFormat = { "markdown", "plaintext" },
parameterInformation = {
labelOffsetSupport = true
}
}
},
synchronization = {
didSave = true,
dynamicRegistration = false,
willSave = true,
willSaveWaitUntil = true
},
typeDefinition = {
linkSupport = true
}
},
window = {
showDocument = {
support = true
},
showMessage = {
messageActionItem = {
additionalPropertiesSupport = false
}
},
workDoneProgress = true
},
workspace = {
applyEdit = true,
configuration = true,
didChangeConfiguration = {
dynamicRegistration = false
},
didChangeWatchedFiles = {
dynamicRegistration = true,
relativePatternSupport = true
},
inlayHint = {
refreshSupport = true
},
semanticTokens = {
refreshSupport = true
},
symbol = {
dynamicRegistration = false,
symbolKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }
}
},
workspaceEdit = {
resourceOperations = { "rename", "create", "delete" }
},
workspaceFolders = true
}
},
clientInfo = {
name = "Neovim",
version = "0.10.2+g8b9864200"
},
initializationOptions = {
hostInfo = "neovim"
},
processId = 3764,
rootPath = "C:\\Users\\sadguitarius\\dev\\react-complete-guide\\section_9\\01-starting-project",
rootUri = "file:///C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project",
trace = "off",
workDoneToken = "1",
workspaceFolders = { {
name = "C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project",
uri = "file:///C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project"
} }
}
[DEBUG][2024-10-19 10:02:17] .../vim/lsp/rpc.lua:286 "rpc.send" {
id = 1,
jsonrpc = "2.0",
method = "initialize",
params = {
capabilities = {
general = {
positionEncodings = { "utf-16" }
},
textDocument = {
callHierarchy = {
dynamicRegistration = false
},
codeAction = {
codeActionLiteralSupport = {
codeActionKind = {
valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }
}
},
dataSupport = true,
dynamicRegistration = true,
isPreferredSupport = true,
resolveSupport = {
properties = { "edit" }
}
},
completion = {
completionItem = {
commitCharactersSupport = true,
deprecatedSupport = true,
documentationFormat = { "markdown", "plaintext" },
insertReplaceSupport = true,
insertTextModeSupport = {
valueSet = { 1, 2 }
},
labelDetailsSupport = true,
preselectSupport = true,
resolveSupport = {
properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }
},
snippetSupport = true,
tagSupport = {
valueSet = { 1 }
}
},
completionItemKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }
},
completionList = {
itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }
},
contextSupport = true,
dynamicRegistration = false,
insertTextMode = 1
},
declaration = {
linkSupport = true
},
definition = {
dynamicRegistration = true,
linkSupport = true
},
diagnostic = {
dynamicRegistration = false
},
documentHighlight = {
dynamicRegistration = false
},
documentSymbol = {
dynamicRegistration = false,
hierarchicalDocumentSymbolSupport = true,
symbolKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }
}
},
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
},
formatting = {
dynamicRegistration = true
},
hover = {
contentFormat = { "markdown", "plaintext" },
dynamicRegistration = true
},
implementation = {
linkSupport = true
},
inlayHint = {
dynamicRegistration = true,
resolveSupport = {
properties = { "textEdits", "tooltip", "location", "command" }
}
},
publishDiagnostics = {
dataSupport = true,
relatedInformation = true,
tagSupport = {
valueSet = { 1, 2 }
}
},
rangeFormatting = {
dynamicRegistration = true
},
references = {
dynamicRegistration = false
},
rename = {
dynamicRegistration = true,
prepareSupport = true
},
semanticTokens = {
augmentsSyntaxTokens = true,
dynamicRegistration = false,
formats = { "relative" },
multilineTokenSupport = false,
overlappingTokenSupport = true,
requests = {
full = {
delta = true
},
range = false
},
serverCancelSupport = false,
tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },
tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }
},
signatureHelp = {
dynamicRegistration = false,
signatureInformation = {
activeParameterSupport = true,
documentationFormat = { "markdown", "plaintext" },
parameterInformation = {
labelOffsetSupport = true
}
}
},
synchronization = {
didSave = true,
dynamicRegistration = false,
willSave = true,
willSaveWaitUntil = true
},
typeDefinition = {
linkSupport = true
}
},
window = {
showDocument = {
support = true
},
showMessage = {
messageActionItem = {
additionalPropertiesSupport = false
}
},
workDoneProgress = true
},
workspace = {
applyEdit = true,
configuration = true,
didChangeConfiguration = {
dynamicRegistration = false
},
didChangeWatchedFiles = {
dynamicRegistration = true,
relativePatternSupport = true
},
inlayHint = {
refreshSupport = true
},
semanticTokens = {
refreshSupport = true
},
symbol = {
dynamicRegistration = false,
symbolKind = {
valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }
}
},
workspaceEdit = {
resourceOperations = { "rename", "create", "delete" }
},
workspaceFolders = true
}
},
clientInfo = {
name = "Neovim",
version = "0.10.2+g8b9864200"
},
initializationOptions = {
hostInfo = "neovim"
},
processId = 3764,
rootPath = "C:\\Users\\sadguitarius\\dev\\react-complete-guide\\section_9\\01-starting-project",
rootUri = "file:///C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project",
trace = "off",
workDoneToken = "1",
workspaceFolders = { {
name = "C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project",
uri = "file:///C:/Users/sadguitarius/dev/react-complete-guide/section_9/01-starting-project"
} }
}
}
[DEBUG][2024-10-19 10:02:18] .../vim/lsp/rpc.lua:408 "rpc.receive" {
error = {
code = -32603,
message = "Request initialize failed with message: Maximum call stack size exceeded"
},
id = 1,
jsonrpc = "2.0"
}