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

Unexpected token. I can't use the package at all. #168

Open
hyunlee1o opened this issue Feb 13, 2023 · 1 comment
Open

Unexpected token. I can't use the package at all. #168

hyunlee1o opened this issue Feb 13, 2023 · 1 comment

Comments

@hyunlee1o
Copy link

hyunlee1o commented Feb 13, 2023

Im running the service on linux to use the lsp on emacs and this happened.

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/jssanchez/.emacs.d/.cache/lsp/npm/vscode-langservers-extracted/lib/node_modules/vscode-langservers-extracted/node_modules/vscode-jsonrpc/lib/common/api.js:37:21)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
/home/jssanchez/.emacs.d/.cache/lsp/npm/vscode-langservers-extracted/lib/node_modules/vscode-langservers-extracted/node_modules/vscode-jsonrpc/lib/common/linkedMap.js:40
        return this._head?.value;
        ```
@luxetobscura
Copy link

In my case I had an outdated version of Node.js (10.x) that didn't support optional chaining. Try updating Node.js to 14.0.0 or newer.

Ref: javascript - How to use optional chaining in Node.js 12 - Stack Overflow

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

2 participants