Install nvm
Install or update nvm:
If zsh
complains about insecure directories, ignore the warning and continue:
Install the latest LTS node.js
List available remote versions:
Install the Latest LTS version:
Verity that node.js
is installed and ready to use:
Install essential npm
global packages
To update node.js
and install globally installed packages:
To check globally installed npm
packages:
To update globally installed packages
Troubleshooting
If your node
version keeps reverting back to a specific old version after nvm use
, check the nvm alias setting inside ~/.nvm/alias/default
(It is safe to delete this file.).
Install Emacs lsp-mode
Make sure lsp-mode
and tide-mode
Emacs packages are installed & configured.
Run M-x lsp-install-server
and select ts-ls
, it will result in the following commands being executed: