Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Maximum call stack size exceeded #55

Open
nverno opened this issue Sep 27, 2023 · 1 comment
Open

RangeError: Maximum call stack size exceeded #55

nverno opened this issue Sep 27, 2023 · 1 comment

Comments

@nverno
Copy link

nverno commented Sep 27, 2023

Hi, I'm trying to run the language server using emacs' lsp-mode,
but the server is crashing shortly after starting with the following
stderr output:

Language Server is started.
node:internal/fs/utils:248
function getDirents(path, { 0: names, 1: types }, callback) {
^

RangeError: Maximum call stack size exceeded
at getDirents (node:internal/fs/utils:248:20)
at readdirSync (node:fs:1551:34)
RangeError: Maximum call stack size exceeded
at getAwkFilesInDir (<...>/nodejs/20.7.0/lib/node_modules/awk-language-server/out/io.js:22:26)

Same thing with node versions v18.5.0 and v20.7.0.

Tracing the calls from lsp-mode to the awk language server, it appears
that emacs is receiving a request for 'workspace/workspaceFolders', then
sending its response 'workspace/workspaceFolders' with params:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "uri": "file:///..."
        },
        etc...
    ]
}

At which point the error happens.
Do you know why this might be? A problem on the lsp-mode side or with the language server?

@nverno
Copy link
Author

nverno commented Sep 27, 2023

Running with the --noIndex flag seems to fix the problem, not sure if that should be default in lsp-mode,
or if the server should be able to run without it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant