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

docs/troubleshooting: Installing tree-sitter-cli fails with node 18 #331

Open
mariasfiraiala opened this issue Dec 31, 2022 · 0 comments
Open

Comments

@mariasfiraiala
Copy link

I am trying to install LunarVim on Ubuntu 20.04. I made sure I had all the prerequisites installed, including node and npm, installed via nvm, as to avoid an EACCES error.

However with node at the latest LTS (v18.12.1 -> Hydrogen), installing tree-sitter-cli fails with:

npm ERR! code 1
npm ERR! path /home/maria/.nvm/versions/node/v18.12.1/lib/node_modules/tree-sitter-cli
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! Downloading https://github.com/tree-sitter/tree-sitter/releases/download/v0.20.7/tree-sitter-linux-x64.gz
npm ERR! node:events:491
npm ERR!       throw er; // Unhandled 'error' event
npm ERR!       ^
npm ERR! 
npm ERR! Error: connect ETIMEDOUT 64:ff9b::8c52:7903:443
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
npm ERR! Emitted 'error' event on ClientRequest instance at:
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:494:9)
npm ERR!     at TLSSocket.emit (node:events:513:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
npm ERR!   errno: -110,
npm ERR!   code: 'ETIMEDOUT',
npm ERR!   syscall: 'connect',
npm ERR!   address: '64:ff9b::8c52:7903',
npm ERR!   port: 443
npm ERR! }
npm ERR! 
npm ERR! Node.js v18.12.1

After browsing the net I've come to the conclusion that it's something related to the IPv6 usage. I downgraded to node 16 (without disabling IPv6 on my machine) and the installation process was finally successful.

It might be a good idea to include these steps in the troubleshooting section, or at least a hint, as it actually saves the user from a lot of trouble 😉 . It is not a LunarVim issue, however it improves user experience (I was this close 👌 to give up and not try LunarVim at all).

@mariasfiraiala mariasfiraiala changed the title docs/troubleshooting: Installing tree-sitter-cli fails with node 18 docs/troubleshooting: Installing tree-sitter-cli fails with node 18 Dec 31, 2022
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