Добавить
Уведомления

Node.js Environment Setup - macOS | Linux || Node Version Manager (nvm)

Node Version Manager (nvm) is my preferred way for setting up Node.js Environment on macOS or on any Linux based systems. This is easy, quick and allows us to switch between Node.js versions if we require to do so for supporting legacy and current projects. To start with we download nvm and install it by using the command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash Then we reload the code it added to .bash_profile (or close and reopen terminal): source ~/.bash_profile We can then check the version of nvm by executing: nvm -v To list all the Node.js versions available to use we can do: nvm ls-remote Then to list stable versions, we can do: nvm ls To install a Node.js version we can do (example v18.13.0): nvm install 18.13.0 nvm use 18.13.0 This makes our system use the selected Node.js version. To list the node version we are using we ca do: node -v To install any other node version we can repeat the nvm install and nvm use command to switch between the node versions

12+
18 просмотров
2 года назад
12+
18 просмотров
2 года назад

Node Version Manager (nvm) is my preferred way for setting up Node.js Environment on macOS or on any Linux based systems. This is easy, quick and allows us to switch between Node.js versions if we require to do so for supporting legacy and current projects. To start with we download nvm and install it by using the command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash Then we reload the code it added to .bash_profile (or close and reopen terminal): source ~/.bash_profile We can then check the version of nvm by executing: nvm -v To list all the Node.js versions available to use we can do: nvm ls-remote Then to list stable versions, we can do: nvm ls To install a Node.js version we can do (example v18.13.0): nvm install 18.13.0 nvm use 18.13.0 This makes our system use the selected Node.js version. To list the node version we are using we ca do: node -v To install any other node version we can repeat the nvm install and nvm use command to switch between the node versions

, чтобы оставлять комментарии