Node.js

NVM

What’s nvm Node.js Version Manager. Like pyenv in Python. One difference from Pyenv is, you can’t label a name to the environment. package.json manage the libraries. Install Follow the official document. https://github.com/nvm-sh/nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash ..... (simple results) Check. $ nvm --version 0.39.0 $ node Command 'node' not found, but can be installed with: sudo apt install nodejs Install Node.js and switch versions # Current available Node.js on the local machine nvm ls # List all available versions nvm ls-remote # Use latest version nvm install node # "node" is an alias for the latest version nvm use node # Use speccific version nvm install 14.

Install Node.js on macOS

Install On Ubuntu 20 https://github.com/nodesource/distributions/blob/master/README.md curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt-get install -y nodejs On Ubuntu 20 in GCP (Mar. 2021) curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - sudo apt-get install -y nodejs On macOS brew update brew install node Check Version check as of March 2020. node --version #v13.10.1 npm --version #6.13.7 Update npm version npm install -g npm@latest