Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node version always is back , after closing terminal

I installed node 10.13 and am using mac 10.14.6.

However, after closing terminal, the version of the node is changed to 10.0.

I would appreciate it if you would tell me how to stick the node version.

$sudo n 10.13
$export PATH=$HOME/.nodebrew/current/bin:$PATH 
like image 381
user3504982 Avatar asked Feb 02 '26 02:02

user3504982


1 Answers

nvm (Node Version Manager) does its job by changing the PATH variable, so you need to make sure you aren't somehow changing your PATH to something else after sourcing the nvm.sh script.

Use the command in the terminal

nvm alias default v10.13

For more detail about the nvm , you can check the link

In case, if you got error as nvm not found then you need to install that

To install nvm, use the install script cURL.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
like image 186
Deep Kakkar Avatar answered Feb 04 '26 16:02

Deep Kakkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!