Como faço para remover a versão do Node js 18.10.0 e instalar a LTS?

Quero usar a versão LTS do Node.js no Vscode, mas na hora da instalação digitei o comando errado o que levou a instalação da versão mais atual ao invés dela(LTS). Tentei instalar a versão desejada “por cima”, porém quando inicio o Node no terminal aparece a mensagem: “Welcome to Node. js v18.10.0”. Como faço para desinstalar uma e fazer a outra funcionar ou simplesmente instalar a que eu quero?

  1. Abra o aplicativo chamado ‘Terminal
  2. Neste aplicativo execute o comando:

flatpak install flathub org.freedesktop.Sdk.Extension.node16 -y

Olá muito obrigada!
não consegui instalar. Aparece a mensagem: “Flatpak system operation Configure not allowed for user”

Please run:

sudo flatpak install -y flathub org.freedesktop.Sdk.Extension.node16//22.08

It will ask for your password and then install Node v16 which can be used in VSCode then.

Olá, apliquei o comando e diz: “Welcome to Node.js v18.10.0” ou seja, instalou, mas não funcionou. De qualquer forma muito obrigada!

OK, seems that for some reason the newly installed Node.js does not take precedence over the old one. Please run:

flatpak override --user --env=PATH=/app/bin:/usr/bin:/usr/lib/sdk/node16/bin com.visualstudio.code

This will add Node v16 to the PATH environment used by VS Code. If you now run node in VS Code’s Terminal, it will use the correct version:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.